- Lab
- A Cloud Guru
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.
Path 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.
What's a lab?
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.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.