This week I completed my CKA with 96% in just few weeks of learning and in this blog post I will be sharing some tips and guidelines that can help you get one.
Video course :
https://www.udemy.com/course/certified-kubernetes-administrator-with-practice-tests/
This is probably one of the best video course you can opt for and that too in really low cost on Udemy (~400 Rs.). The course has both theoretical concepts explained in detail, awesome hands on labs to practice and the mock tests to help pass the exam with flying colours.
Make sure to complete the labs and specially mock exams at-least twice or thrice.
In exam tips :
- No, its not the toughest as mentioned in some medium blogs, it’s easy if you have done the course along with mocks and lightning labs twice.
- Double check the name of the pod / deployment, name of container, service name, context you are using, labels and namespace (it’s silly mistake prone area).
- You will given a bastion host at first which has 5 contexts (clusters) already set. Make sure you are on the right context before starting the exam, its mentioned on top of each question in bold letters.
ssh
access is provided for all 5 clusters (masters and nodes), ssh commands are already provided in questions wherever required.- K8s version in exam is 1.18 (as of April 2020) so certain commands change like
--dry-run
becomes--dry-run=client
andkubectl run
can now only create pods without--generator
flags. cmd+c
andcmd+v
works just fine (for Macbook at least)- Bookmark cheatsheet page – https://kubernetes.io/docs/reference/kubectl/cheatsheet/
- Set autocomplete before starting – https://kubernetes.io/docs/reference/kubectl/cheatsheet/#kubectl-autocomplete
- Use imperative commands as much as possible and edit as per the requirements of question :
- Do
kubectl create deployment nginx --image nginx --dry-run=client -o yaml > deploy.yaml
and edit deploy.yaml forx
number of replicas and apply thedeploy.yaml
to create a deployment withx
number of replicas. kubectl run nginx --image=nginx --dry-run=client -o yaml > pod.yaml
to create an nginx pod yaml and apply the yaml after making any required changes.kubectl expose pod/deployment --name nginx-service --type ClusterIP --port 80 --target-port 80 --dry-run=client -o yaml > svc.yaml
to expose a pod or deploymentkubectl create secret generic db-secret --from-literal=password=confidential
(no need to encode the secretconfidential
, its encoded on its own when using imperative commands)
- When you do
--dry-run=client -o yaml
, redirect the yaml output to the current question number (like--dry-run=client -o yaml > 1.yaml
for first question), so later its quick, easy to revalidate the attempt and edit changes if any.
- Do
- Following are some other important commands that would be useful :
journalctl -u kubelet
to get kubelet service logs (tail
the logs in case needed)systemctl status kubelet
,systemctl restart kubelet
andsystemctl daemon-reload
to get the status of kubelet and restart in case needed.kubeadm init --config=/location/of/kubeadm.config
to create a kubeadm cluster with provided config
jsonpath
is not really needed (simply copy paste the required pod name to required text file name),--sort-by
is needed for sorting resources based on certain criteria.- Use https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/#create-a-simple-pod-to-use-as-a-test-environment to
nslookup
on anyClusterIP
service and pod. - Make use of
-l abc=xyz
and--show-lables
likekubectl get pods -l abc=xyz
andkubectl get nodes --show-labels
to get through things faster. - Yes, you can copy whole yaml from docs as well, so use it for the objects like
persistentvolumes
for which there are no imperative commands instead of typing yaml in vim. - You will have ample amount of time so make sure to read (twice) and understand the question well before attempting.
- It might take more than 30 hours for getting the results on email and portal.
Finally, special thanks to folks at Srijan for immense support and guidance!
Feel free to get in touch in case of issues and concerns.
$ kubectl get cka

Thanks for the detailed information.
LikeLiked by 1 person
Thanks and do share it! 🙂
LikeLike
Nice information. Thanks.
LikeLiked by 1 person
Thanks and do share it! 🙂
LikeLike
Very informative points. Thank you, Vishnu.
LikeLiked by 1 person
Thanks and do share it! 🙂
LikeLike