DEV Community

Cover image for Mastering Kubernetes: Your First Lab
Labby for LabEx

Posted on

Mastering Kubernetes: Your First Lab

Introduction

This article covers the following tech skills:

Skills Graph

Hi there, welcome to LabEx! In this first lab, you'll learn the classic "Hello, World!" program in Kubernetes.

Click the Continue button below to start the lab.

Hello Kubernetes

Let's start by creating a simple Kubernetes deployment.

Open a terminal and start a Kubernetes cluster using minikube start.

minikube start
Enter fullscreen mode Exit fullscreen mode

This will take a few minutes to complete.

We'll use the kubectl run command to create a deployment with a single container. The container will run the nginx image, which is a simple web server.

kubectl run hello-kubernetes --image=nginx --port=8080
Enter fullscreen mode Exit fullscreen mode

Now, let's check the status of the deployment.

kubectl get pods
Enter fullscreen mode Exit fullscreen mode

Summary

Coungratulations! You have completed your first LabEx Lab.

If you want to learn more about LabEx and how to use it, you can visit our Support Center . Or you can watch the video to learn more about LabEx.

Programming is a long journey, but Next Lab is just one click away. Let's do it!

MindMap


🚀 Practice Now: Your First Kubernetes Lab


Want to Learn More?

Top comments (0)