CNCF Certified Kubernetes Administrator or Developer CKA(D) Exam Practice Examples, Dumps & Tips.

Sen Sri
7 min readDec 23, 2019

--

Practice makes a Man Perfect — So practice, practice, and practice before the CKA & CKAD exam and score 100%.

To start with understand the concepts and practice all exam topics thoroughly as per the below example questions. The exam is intense though as it requires 3 hours of concentrated effort during which you need to solve 24 problems but as long as you enjoy solving problems, it feels very rewarding. it's not very difficult to clear the exam (as some articles on the internet claim it to be) provided you. So, if you are interested to take this exam and have a second thought about it, my sincere advice is, just do it! You will clear it!!

Practice these Examples questions:

My Exam Practice Question Dumps:

  • CNCF Kubernetes Class + labs
  • K8S The Hard Way run through
  • Run through all the tasks in the k8s docs
  • Practice with systemd, journald, openssl, cfssl, and etcd
  • Work through the sections in the above GitHub list

Note — there are no answers here on purpose. You should be able to do these yourself using the minimal docs that you are allowed to use during the test. At a minimum, this should train you on where to look for this info during the test, without notes

Practice Example Question Dump -1:

— Each of you creates the below in your namespace.

— For each of the questions above, always keep a label “ques=prob<x>” assigned.

Keep the specification copied into directory /opt/<yourname>/spec.prob<x>

— — — — —

1. Create a pod named “web” using image nginx:1.11.9-alpine, on ports 80 and 443

2. Create a service to expose that pod, named as “webservice”

3. Copy the dns records for the service in file /opt/<yournamespace>/web.dnsrecord

4. Create a deployment with “redis” image on port 6379 and expose a service.

5. Increase the number of replicas to 3

6. Perform a rolling update to version 4.0.11-alpine.

7. Copy pod spec to file /opt/yournamespace/podversion.

8. Undo the image update to redis.. and confirm pod spec image matches

9. Create a multi-container pod, with redis, memcached, nginx and mysql,

assign resource memory limit as 250M for each container.

10. List all the pods in your namespace sorted by name.

11. Mount a temporary volume within a busybox pod named “shell”

at directory “/export/volume” copy the pod spec into /opt/yourname/shellvolume

12. To the earlier pod “shell” attach liveliness probe to check the file

/export/volume/app.log being available.

13. Setup init container into shell pod that got created just now, to

create a file /export/volume/app.log empty file before the busybox container

is run.

14. Create a secret “<yourname>-secret” with user=<yourname>, secret=”SOMESECRET”

edit the “shell” pod to have the above secret imported as a volume

at /opt/mysecretvolume, and MYSECRET environment defined to map to

key secret in “<yourname>-secret”

15. Create a persistent Volume named “<yourname>”

specification that defines a volume for 10Gi mapping to hostpath /opt/<yourname>

16. Take the etcd database snapshot saved into file /opt/<yourname>/etcdsnapshot

the certificates and keys are available in /opt/certs directory.

17. Get the dns records for the service and pods for the deployment “redis”

copied to file /opt/<yourname>/dnsrecord.redis

18. List all the pods that are serviced by the service “webservice”and copy the output in /opt/<yourname>/webservice.targets

############################################

Practice Example Question Dump -2:

— create a namespace <name>0830 and perform the following tasks.

— for each task create a spec file and save it in the homedirectory/namespace

as spec.p<num>

— — — — —

1. Create a pod redis version 5.0-rc4-alpine named “mycache”

2. Upgrade the pod to use 5.0-rc-alpine and save the pod spec as p2

along with the command used.

3. Create a config map from file /var/lib/kubelet/config.yaml

and create a nginx pod that sees the configmap as a volume in the same path within the container,

assign port 80 and expose it as a service “webservice” as well. The pod should be named “web”

4. Create a busybox container that sleeps 60000, named “mybox”.

5. Attach liveness probe to the container and restart if environment USER is null or undefined.

Report pod status after attaching liveness probe.

6. Pass ENV variables “USER” and “SECRET”

from a secret “boxsecret” defined already that has these initialized as “bob”/”somesupersecret”

7. Attach resource requests and limits for cpu and memory at 10m/10m and 100m/1000M

for “mybox” pod above.

8. Create a pv named “yourname-volume” that maps to hostpath “/opt/volume/yourname/” as 100G capacity, and

policy reclaim.

9. Create a deployment “myvolume” for memcached that get a 1G volume mapped from

yourname-volume at /opt/myvolume

10. Scale the deployment to have 2 replicas.

11. Update myvolume deployment to have 1.5.10-alpine image on all replicas.

12. Setup a init container in myvolume deployment to init a file in the mapped volume

/opt/myvolume/config.yaml before the real memcached kick starts.

13. Monitor pod lifecycle and log messages when pod/container starts/stops.

14. Create a multi-container pod with nginx, memcached, redis all sharing the

volume mount at /opt/myvolume with a 1G claim from your earlier pv created.

15. List all objects in your namespace that has label “ques=p5”

Find all pods that are serviced by your webservice.

############################################

Additional Practice Example Question Dump -3:

  1. Create a node that has a SSD and label it as such.
  2. Create a pod that is only scheduled on SSD nodes.
  3. Create 2 pod definitions: the second pod should be scheduled to run anywhere the first pod is running — 2nd pod runs alongside the first pod.
  4. Create a deployment running nginx version 1.12.2 that will run in 2 pods
    a. Scale this to 4 pods.
    b. Scale it back to 2 pods.
    c. Upgrade this to 1.13.8
    d. Check the status of the upgrade
    e. How do you do this in a way that you can see history of what happened?
    f. Undo the upgrade
  5. Create a service that uses a scratch disk.
    a. Change the service to mount a disk from the host.
    b. Change the service to mount a persistent volume.
  6. Create a pod that has a liveness check
  7. Create a service that manually requires endpoint creation — and create that too
  8. Create a daemon set
    a. Change the update strategy to do a rolling update but delaying 30 seconds between pod updates
  9. Create a static pod
  10. Create a busybox container without a manifest. Then edit the manifest.
  11. Create a pod that uses secrets
    a. Pull secrets from environment variables
    b. Pull secrets from a volume
    c. Dump the secrets out via kubectl to show it worked
  12. Create a job that runs every 3 minutes and prints out the current time.
  13. Create a job that runs 20 times, 5 containers at a time, and prints “Hello parallel world”
  14. Create a service that uses an external load balancer and points to a 3 pod cluster running nginx.
  15. Create a horizontal autoscaling group that starts with 2 pods and scales when CPU usage is over 50%.
  16. Create a custom resource definition
    a. Display it in the API with curl
  17. Create a networking policy such that only pods with the label access=granted can talk to it.
    a. Create an nginx pod and attach this policy to it.
    b. Create a busybox pod and attempt to talk to nginx — should be blocked
    c. Attach the label to busybox and try again — should be allowed
  18. Create a service that references an externalname.
    a. Test that this works from another pod
  19. Create a pod that runs all processes as user 1000.
  20. Create a namespace
    a. Run a pod in the new namespace
    b. Put memory limits on the namespace
    c. Limit pods to 2 persistent volumes in this namespace
  21. Write an ingress rule that redirects calls to /foo to one service and to /bar to another
  22. Write a service that exposes nginx on a nodeport
    a. Change it to use a cluster port
    b. Scale the service
    c. Change it to use an external IP
    d. Change it to use a load balancer
  23. Deploy nginx with 3 replicas and then expose a port
    a. Use port forwarding to talk to a specific port
  24. Make an API call using CURL and proper certs
  25. Upgrade a cluster with kubeadm
  26. Get logs for a pod
  27. Deploy a pod with the wrong image name (like — image=nginy) and find the error message.
  28. Get logs for kubectl
  29. Get logs for the scheduler
  30. Restart kubelet
  31. Convert a CRT to a PEM
    a. Convert it back
  32. Backup an etcd cluster
  33. List the members of an etcd cluster
  34. Find the health of etcd

############################################

Tips:

You will not hit the time limit only if you keep practicing… this certification is about the practice and hands-on…. no other way out…Again practice, practice, and practice before the CKA & CKAD exam and score 100%

The kind of questions you are likely to get will be similar to the above ones. and you have 2 attempts to clear it…Clap and show your support.. Best of Luck.

--

--