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.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Create the Cluster
- Create the cluster configuration using the script provided.
- Update the cluster using kops.
- Validate the cluster.
- 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.
- 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
- 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.