Your First Kubernetes Lab

KubernetesKubernetesBeginner
Practice Now

Introduction

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.


Skills Graph

%%%%{init: {'theme':'neutral'}}%%%% flowchart RL kubernetes(("`Kubernetes`")) -.-> kubernetes/BasicCommandsGroup(["`Basic Commands`"]) kubernetes/BasicCommandsGroup -.-> kubernetes/get("`Get`") kubernetes/BasicCommandsGroup -.-> kubernetes/run("`Run`") subgraph Lab Skills kubernetes/get -.-> lab-92733{{"`Your First Kubernetes Lab`"}} kubernetes/run -.-> lab-92733{{"`Your First Kubernetes Lab`"}} end

Hello Kubernetes

Let's start by creating a simple Kubernetes deployment.

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

minikube start

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

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

kubectl get pods

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!

Other Kubernetes Tutorials you may like