- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud

Patching Live Kubernetes Deployments and Draining a Node for Maintenance
This lab guides the student through the creation of a cluster using kops. Once created, the cluster is used to deploy four replicas of the NGINX web server. Then the kubectl patch command is used to update the version of NGINX running in the pod containers. The last exercise is to drain a node for maintenance.

Lab Info
Table of Contents
-
Challenge
Create the Cluster
- Create the cluster configuration using the script provided.
- Update the cluster using kops.
- Validate the cluster.
-
Challenge
Deploy the NGINX Replicas
- Deploy four replicas of the NGINX web server, version 1.7.9 from the GitHub repo.
- View the Pods running.
- View the version of the container within the Pod.
-
Challenge
Patch the Live Containers
- Download the NGINX 1.9.1 Pod spec with the
wget
command from the GitHub repo. - Patch the live containers running in the nginx-deployment with version 1.9.1.
- Interrogate the status of the deployment.
- Check the Pods.
- Download the NGINX 1.9.1 Pod spec with the
-
Challenge
Drain a Worker Node for Maintenance
- See which pods are running on which nodes.
- Select a node to drain and drain it.
- Examine the status of the deployment replicas.
- Reattach the node.
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.