Mock Exam 2 - CKA
CKA Mock Exam 2 solutions covering DNS resolution testing for services and pods using nslookup from a busybox container.
These commands run a temporary busybox pod to perform DNS lookups within the cluster. The first command resolves a Kubernetes service by its FQDN, and the second resolves a pod by its dashed-IP DNS record. Both outputs are saved to files for verification.
1
2
3
kubectl run dns -it --image=busybox:1.28 --restart Never -- nslookup resolver-service.default.svc > CKA/nginx.svc
kubectl run dns -it --image=busybox:1.28 --restart Never -- nslookup 10-244-1-8.default.pod > CKA/nginx.pod
This post is licensed under CC BY 4.0 by the author.