Practice Drill

Learn how to put the latest open source technology into practice with hands-on training, delivered by industry experts, aligned to your desired business outcomes

The pod defined in the problem.yaml below creates a pod meant to run a perpetual tail command in the busybox image. The pod, which runs an init container with the alpine:latest does not run as expected. Apply the manifest to your cluster, identify the problem and repair it so that the pod runs as expected.

Apply the problem.yaml manifest to your cluster using the following command:

kubectl apply -f https://raw.githubusercontent.com/RX-M/bust-a-kube/master/workload-1/problem.yaml

The pod must be in the running state with all containers ready for this problem to be considered resolved.

Practice Drill: Answer

Create the nginx deployment:

$ kubectl create deployment nginx --image=nginx:1.9 --replicas=2 --record

deployment.apps/nginx created

$

Update the deployment to use the nginx:latest image:

$ kubectl set image deploy nginx nginx=nginx:latest --record

deployment.apps/nginx image updated

$

Undo the image update and rollback the deployment to use the nginx:1.9 image:


$ kubectl rollout undo deploy nginx
deployment.apps/nginx rolled back

$

As an additional exercise, try creating a pod that binds to a persistent volume claim and create the necessary Kubernetes objects.

RX-M can provide more help with preparing for the CKAD exam in one of our CKAD bootcamps; we offer open enrollments and private engagements for teams or organizations.