Working with Kubernetes Using kubectl

30 minutes
  • 4 Learning Objectives

About this Hands-on Lab

This hands-on lab will provide you with the opportunity to practice your basic `kubectl` skills in a real Kubernetes cluster. You will create and manipulate some simple Kubernetes objects using `kubectl`. This will allow you to exercise your `kubectl` skills.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Use kubectl to Check the Status of Worker Nodes in the Cluster
  • Use kubectl to list all nodes in the cluster
  • Verify the nodes are in the READY state
Get a List of Pods Running in the Cluster
  • Use kubectl to list Pods in all namespaces
  • Verify whether or not these Pods are all up and running
Delete an Existing Pod
  • Delete the Pod named web-frontend
Create a New Pod
  • Create a new Pod called web-frontend
  • Make it run a container with the nginx image

Additional Resources

Your company is using Kubernetes to run some of the infrastructure for its frontend web portal. There have been a few customer-facing issues overnight. You have been asked to check the status of the cluster and perform a few maintenance tasks.

  • Use kubectl to check the status of all nodes in the cluster and make sure they are working
  • Get a list of Pods running in the default namespace and make sure they are all running
  • Delete the web-frontend Pod
  • Create a new web-frontend Pod and running the nginx image

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?