305-998-7702 | 415-800-2922 info@rx-m.com

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

Create a pod that runs the nginx image and uses a ServiceAccount called my-sa.

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.