Vote Ultimate Certified Kubernetes Application Developer (CKAD) Mock Exam Series

Hi Team,

For the question as below, the second part evaluation is always going to fail as by the end of exam few more pods will be created. Can you confirm whether that’s the issue? if so help rectify. TIA

This scenario is categorized into two parts. Please find them below.

Part I :

We have already deployed several pods in the default namespace. Create a ClusterIP service .i.e. service-3421-svcn , which should expose the pods, namely, pod-23 and pod-21 , with port set to 8080 and targetport to 80 .

Part II :
Store the pod names and their ip addresses from all namespaces at /root/pod_ips_ckad02_svcn where the output is sorted by their IPs.

I’m not a fan of this type of question, since you’re correct that from when you get the question on the mock exam, and the end of the exam, the correct output for xx will change.

I deal with this sort of question in the mock exams (I don’t think you’d get this in a real exam) by putting the command into a file and running it just before I press “End Exam”:

student-node ~ ➜  cat run-before-end.sh 
kubectl --context=cluster3 \
  get po -A \
  -o custom-columns="POD_NAME:.metadata.name,IP_ADDR:.status.podIP" \
  --sort-by=".status.podIP" > /root/pod_ips_ckad02_svcn

I then run it just before I end the exam:

. run-before-end.sh