- Lab
-
Libraries: If you want this lab, consider one of these libraries.
Managing the Kubernetes API Server and Pods
In this lab, you'll practice managing the Kubernetes API Server and pods using kubectl, curl, labels, and pod configuration. When you're finished, you will have successfully made direct API Server requests using kubectl and curl, applied labels to connect and manage workloads, and configured pod probes and init containers to control pod lifecycle behavior.
Lab Info
Table of Contents
-
Challenge
Access the terminal
- Sign in using the lab credentials and open the terminal.
- SSH to the lab VM as
cloud_userand confirm the host is ready. - Verify that
kubectlandcurlare available on the command line.
-
Challenge
Use kubectl to interact with the Kubernetes API server
- Confirm cluster connectivity.
- Explore the API surface with
kubectlcommands. - Create a Deployment and verify its Pods reach the
Runningstate.
-
Challenge
Interact with the Kubernetes API server using curl
- Extract the API server endpoint and client credentials from the kubeconfig.
- Save the client credentials as certificate and key files.
- Send authenticated
curlrequests to list API resources and Pods.
-
Challenge
Use labels to connect workloads
- Inspect labels on the existing Pods.
- Create a standalone Pod that does not match the Deployment label set.
- Add and remove labels and verify membership with label selectors.
-
Challenge
Configure Pod probes and init containers
- Define a Pod manifest with an init container for setup work.
- Configure readiness and liveness probes on the application container.
- Apply the Pod and verify init completion and status.
About the author
Real skill practice before real-world application
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.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.