How to prepare and pass Certified Kubernetes Administrator(CKA) exam

Vladimir Belousov
6 min readJul 21, 2019

--

In this post I want to share my successful experience in preparing and passing the Certified Kubernetes Administrator (CKA) exam.

Tl; DR:
Mumshad Mannambeth “Certified Kubernetes Administrator (CKA) with Practice Tests”
Marko Luksa “Kubernetes in Action”
Official Kubernetes Documentation
Kubernetes the hard way
A lot of practice: Katacoda, GKE

General information

I spent about 1.5 months preparing for the CKA.
My first thought was to quickly find a training course, watch it and get the cherished achieve! You should consider the following: CKA differs from the general exams in that it is completely practical. There are no Tasks to select one or more options. Only manual labor and hardcore.
The exam format is quite simple: 24 questions, 3 hours of time to solve them. Questions are ranked by “weight,” but from my point of view, the “weight” of questions is sometimes not quite correct. For example a task with InitContainers is estimated at 7% (it is quite simple) and more complex ConfigMaps at 8%, and TLS Bootstrapping at 9%.

Educational materials

My first attempt to learn Kubernetes was to read the book by Marko Lukša “Kubernetes in Action”. I want to say that this is the best manual I’ve ever seen. Marko did an amazing job! His book is very practical, understandable and … large in volume 😆. Specifically for exam preparation it may seem a bit more complicated than necessary. But you have to clearly answer the question for yourself: do you just want to get a CKA and boast to a girlfriend/boyfriend, or deal with the product. Anyway the Marko’s book will be a great help.
I read it in about 2–3 weeks, performed all the Tasks from the book and of course there was just chaos in my head by the end of reading. I did not remember what was in the beginning, but this is normal!
So I took a rest in a few days to completely forget about the Kubernetes.
The next step was to find material that will help reinforce my knowledge. It was the Mumshad Mannambeth course “Certified Kubernetes Administrator (CKA) with Practice Tests”.
This course is aimed specifically at preparing for the CKA. I want to note the excellent presentation of the material from the author: various animations, presentations, a lot of practical tests that are most similar to the practical exam. The author amazingly expounds the basic concepts of Kubernetes and most of his lectures reinforces with practical work. Mumshad also has a channel in Slack, where the community helps each other. This is really great!
You can take the mock exam and roughly understand your level at the end of the course. I want to immediately warn against the following: this is not a dump of the exam, not completely similar questions, etc. The exam is fairly close to the present in its content. Note that by passing a mock you can easily fail the CKA exam.
The third training material was the official documentation Kubernetes. It is written quite clearly and simply, with many practical examples, tasks, etc. From my point of view to read it as a book is useless. I did something like this: I chose a topic, read the documentation, watched a video lecture, supplemented it with a book by Marko and did a practical task. I also almost completely resolved the Tasks from the official documentation.

The fourth item was “Kubernetes the hard way”. Having decided it for the first time I didn’t understand anything at all. In the beginning it was like copy-paste-waaau, it works! Many people who have passed the CKA, advise to perform it several times. I did 7 😉As Kelsey Hightower says this is “is not for people looking for a fully automated command to bring up a Kubernetes cluster”. This tutorial is deep-dive, it is well-structured, only thanks to it I have at least a little understood the topic of certificates in Kubernetes, settings of various components of Control Plane and Worker Nodes.

Practical advice

  1. Make the most of the official documentation. Sometimes the exam will turn into a copy-paste, but you are limited in time and this is the easiest way to solve the task.
    2. At the beginning of the exam, be sure to write down the question number and its “weight” in the built-in Notepad (which is just awful by the way). I thus perfectly understood what issues I decide. I read about the various tactics of exam solution: difficult questions then easy questions and vice versa. Maybe you don't need to start with difficult issues because you can spend a lot of time and do not solve anything in the end. In my case I carried out the questions in order, those that were incomprehensible to me, missed and returned at the end of the exam.
    3. You should be well versed in the Linux console commands — grep, systemctl, journalctl (with its options) The exam will have tasks in which you need to view the logs of the Kubernetes components, find the error and fix it. For journalctl I used the “-l”, “-no-pager” options but this question is up to you.
    You must be able to view the status of services, restart them, stop, etc. I supported this question with the article DigitalOcean
    4. Be sure to switch the kubectl context to the cluster being used.
    5. Working with kubectl for almost 80% of the successful passing of the exam. You need to quickly and accurately execute various commands. Alternatively you can use command aliases, for example, kgp=kubectl get pods, kgd=kubectl get deployments. Of course, I made them and … never used it because I was in too much of a hurry 😆
    6. Be sure to use kubectl with the -oyaml --dry-run options. When creating various Kubernetes objects, this will save you a lot of time.
    7. Learn well JSONPath. On the one hand the questions are quite simple, but I spent an inadmissible long time on one of them. In the course of Mumshad this issue is dealt with in some detail.
    8. The exam will be a question related to DNS and remember the following: in DNS Pod name is not the Hostname, but the IP address separated by hyphens. For example, 10–1–1–1.default.pod.cluster.local. This question is dealt with in Mumshad in lectures 147, 148, 149.
    9. Make the entire output of various commands to the host to which you have switched context when performing the Task. Do not save the output of commands in the file system Pod. I made exactly this mistake.
    10. If the Tasks says to create a Pod make it exactly but not Deployments. From my point of view, one of the simplest methods is a command of type kubectl run nginx --image=nginx --restart=Never. Again this is your choice
    11. Be sure to study the Kubectl Cheat Sheet and follow all the commands that are there. They will be very useful in the exam.
    12. Carefully study the topic of Static Pods, this will help you very well when troubleshooting the non-working Kubernetes components.
    13. TLS Bootstrapping. From my point of view the most voluminous question on the exam. It seemed to me more difficult than Mumshad described in his course and in the practical tests.
    14. I will not talk about each Kubernetes object, but you definitely need an understanding of Pods, Static Pods, Deployments (creation, update, scaling), DaemonSets, Service (Expose), Volume / Persistent Volume

Conclusion

I apologize if the post turned out to be quite voluminous, but it can you really understand what awaits you on the exam
Be sure to keep in mind that this is my personal experience and it may differ from what you have.
I wish you good luck and remember that everything is in your hands!

P.S. By tradition I want to thank my beloved wife Anna Belousova ❤️for patience and understanding. I would have failed without her. She is my talisman and the most beloved person.

--

--