Certified Kubernetes Administrator (CKA) — notes and 20 tips(May 2020)
Introduction
I have recently given my CKA exam, passed with 100% and want to share my experience and throw some light into the details of the examination along with some tips.
First, to start off, the exam uses Kubernetes version 1.18.2 as of today. There are some differences between previous versions of kubectl imperative commands (1.16/17) and this version. There is a medium post by Luc Juggery which describes these differences, please take a look.
Let me clarify this, if you are using Kubernetes (k8s) at work regularly, this examination is not really tough, like several other blogs mentioned. I personally completed the exam in less than 2 hours (scored 100%) and I think you can too.
I have followed only Mumshad M course on Udemy, in my opinion this is sufficient. Please attempt the 3 practice tests that are available. → https://www.udemy.com/course/certified-kubernetes-administrator-with-practice-tests/
Few blogs, GitHub content I followed →
Bao Huynh -> https://medium.com/faun/passing-certified-kubernetes-administrator-exam-tips-d5107d8e3e7b
Nilesh Jayanandana → https://medium.com/platformer-blog/how-i-passed-the-cka-certified-kubernetes-administrator-exam-8943aa24d71d
Follow the course and these blogs, Github, you will be more than well prepared for the certification.
Structure of Exam
Probably you have already gone through it, but let me mention again. There are 24 tasks for you to complete in 3 hours. Each question has different weight (1% to 9%) and they are set in different cluster. There are 6 clusters. 3 hours is gracious amount, so don’t panic.
All questions pertaining to a cluster are packed together, so you technically have to change clusters 5 times. Before each question, ‘context change command’ is provided for you to change the cluster. You click on these commands to copy to clipboard. So no worries there. The ‘click to copy’ feature was very useful in the exam. Please do not try to type manually, better use this feature.
kubectl config use-context k8s
Make sure to read the questions carefully, based on my understanding even if you miss a single alphabet, for example, if the question asks you to create a pod named ‘jenkins’ and you have created ‘jenkens’, I suspect the answer is invalidated. So please use ‘click to copy’ feature. Some questions ask you to redirect command output to a file@path. Match it carefully and re-check by ‘cat’ the file@path.
Official latest curriculum → https://github.com/cncf/curriculum/blob/master/CKA_Curriculum_V1.18.pdf
Tips
- Don’t panic and try to keep your cool.
- If you are attempting the exam from your home, prepared to show around using your laptop or webcam, complete 360 degrees and show hands for ‘no-smart-watches’ rule etc., desk needs to be cleared off every thing except for your laptop or PC. They were strict about this.
- A clear water bottle is allowed. Thank God for that.
- kubernetes.io is your bible, if you have never read or used this, please do now. Or at least know your way around in there. You are allowed to open only this site and most probably you can find answer for every question.
- Use ‘ssh <node Name>’ to login to any node. Always exit to the main VM where you logged, I think if I remember correctly it was ‘student@node-1’.
- Assume root access by using ‘sudo -i’ command after logging in. Once task is completed, always remember to ‘exit’ twice to reach to ‘student@node-1’ machine.
- Prepare to install or repair clusters using kubeadm. The exam assumes that you have installed using kubeadm. There were 3–4 questions using kubeadm in 2 different cluster.
- One thing I have never used till date in k8s, was JSONPath expressions. In CKA there were at least 3–4 questions which uses this. Try to practice JSONPath expressions, customcolumns and sort-by options.
- Make sure to explore the logs for kubelet and how to debug it, if it’s broken or simply, not started. Silly thing like, ‘systemctl enable kubelet’ should suffice.
- Prepared to be using ‘docker ps’ in case if kubelet or kube-apiserver is broken.
- There is a notes section available for you save any notes. Click on “ExamsControl” on the top and then click “notepad”. You can track your attempted question + weight.
- Try to attempt to finish the ‘KTHW’ at least once. This would give you a fair idea on how k8s works under the hood. At least browse any demos if available. I did twice using Mumshads KTHW here.
- Try to use imperative commands as much as possible to save time. With 1.18 fixing the kubectl run workings, it’s very clear to use now.
- Concentrate on StaticPods, NodeSelector, Kube-Scheduler, Kubelet, Kubeadm, secrets and ETCD backup/restore.
- There are some blogs on Medium with solutions to some of CKA questions. Just FYI.
- Use ‘kubectl explain <resource>.spec’ to know how to specify the yaml files if needed. For example, ‘kubectl explain pod.spec.securityContext’ to know about what keys are available for SecurityContext options.
- Few more commands that could help, ‘kubectl api-versions’, ‘kubectl api-resources -owide’, selector option, ‘kubectl get pods — selector name=foo’
- Note down few files and locations like /var/lib/kubelet/config, /etc/kubernetes/manifests/ etc.,.
- You will be using Linux for everything. So get familiar and practice with vi, systemctl, service, journalctl commands.
- Try to create a pod with multi-containers, init-containers and test pods with busybox:1.28, which helps you to use nslookup, wget etc.,
I hope these 20 tips and notes about CKA examination helps you with your certification. Don’t panic, please type slowly and use the ‘click to copy’ feature as much as you can.
If you like these tips and notes, please show by clapping.
All the best !!