Daniel's Tech Blog

Cloud Computing, Cloud Native & Kubernetes

My preparation and tips for the Certified Kubernetes Administrator exam

A few weeks back, I passed the Certified Kubernetes Administrator exam, a long-term item on my to-do list, and eventually accomplished it.

-> https://www.cncf.io/certification/cka/
-> https://training.linuxfoundation.org/certification/certified-kubernetes-administrator-cka/

I have been working with Kubernetes for nearly seven years now. Mostly with managed Kubernetes on Azure, Azure Kubernetes Service (AKS). Besides Azure Kubernetes Service, I am using KinD, Kubernetes in Docker, or Kubernetes on Docker Desktop daily for testing. I also played around with kubeadm, k3s, and Rancher Kubernetes Engine (RKE) in my home lab.

So, I would say I have quite some experience with Kubernetes and have not taken the exam lightly. Hence, I share with you how I prepared for the exam.


Even though I am working daily with Kubernetes, I bought a book to prepare for the exam. Yes, a book. As I am addicted to the books from O’Reilly, I got myself the Certified Kubernetes Administrator (CKA) Study Guide by Benjamin Muschko.

-> https://www.oreilly.com/library/view/certified-kubernetes-administrator/9781098107215/

I went through the book and focused on topics like Kubernetes cluster creation, updates, and all things regarding etcd. Those are especially helpful for the exam when you use and work with managed Kubernetes.

After finishing the book, I did the exercises mostly on Kubernetes on Docker Desktop and the Kubernetes cluster and etcd part on two Raspberry Pi 4 with 4 GB memory each.

Besides the technical part, I invested time in getting very familiar with the Kubernetes documentation and how to find the relevant sections via the search in the shortest amount of time. The Kubernetes documentation is one allowed resource during the exam and is tremendously helpful in getting the correct syntax for the Kubernetes templates.

Final preparation

When you book your Certified Kubernetes Administrator exam, you get two killer.sh sessions for free to prepare for the exam with the exam simulator.

-> https://killer.sh/

I started using the exam simulator five days before my exam date. Each simulator session is available for 36 hours, and you can reset the simulator environment.

In total, I did two runs of the exam simulator per session and actually spent eight hours in the simulator getting familiar with the exam environment.

From those runs, I can tell you that you get the most out of the simulator and the confidence to pass the exam.

Might have been the simulator sessions enough to prepare for the exam? I would say yes, but better safe than sorry, as the exam is expensive. In my case, I used my discount code from KubeCon Europe and was fortunate enough that my employer, LeanIX, covered the exam costs.

One thing that should not be underestimated is to get enough sleep the night before the exam. Be well rested before the exam, as it will be your two-hour fire drill, which will be energy-sapping enough.

Everyone who did the exam or works as an on-call engineer knows what I am talking about.

Tips for the exam

Now we come to the exciting part. First, I want to highlight that you should spend the first three to five minutes of the exam to get Firefox and the terminal ready for the rest of the exam. Even wasting those five minutes at the beginning will pay off during the remaining time.

My first action was opening the Kubernetes documentation with Firefox.

-> https://kubernetes.io/docs/

After that, I opened the terminal and edited the .vimrc and .bashrc. Yes, I am using Vim and strongly recommend this text editor for the exam. The .vimrc contains three configurations per default, where I only kept the following two.

set tabstop=2
set expandtab

set tabstop=2 defines that a tab stop is two whitespaces long. The other one, set expandtab, tells Vim that a tab stop uses whitespaces instead of the tabulator character, a huge difference when dealing with Kubernetes templates. Besides those two, I added a couple of other configurations to the .vimrc.

set number
set list
set lcs+=space:^
syntax on

I only like to highlight set number and set lcs+=space:^. Having line numbers in Vim is tremendously helpful if you messed up the Kubernetes template and kubectl apply -f returns the line number of the faulty configuration.

set lcs+=space:^ lets Vim display whitespaces as ^ in my case. Kubernetes templates are YAML files. Hence, correct indentation is crucial, and using set lcs+=space:^ makes it straightforward during the exam to accomplish this.

Vim in terminal window

After modifying the .vimrc I added a couple of configurations to the .bashrc to have them also available in the tmux windows.

Before we dive into those configurations, I have another tip for you. When you are not familiar with tmux or another terminal multiplexer, become familiar with terminal multiplexing. You definitely need this in the exam.

alias kx='kubectl config use-context'
alias kn='kubectl config set-context --current --namespace'
alias info='kubectl config get-contexts'
export do="--dry-run=client -o yaml"

The kxkn, and info aliases let you easily switch between clusters and namespaces and verify that you are working within the correct context.

One of the tips from the exam simulator was the export do=”–dry-run=client -o yaml”. It is a huge time saver as you do not need to type every time –dry-run=client -o yaml when you want to create the Kubernetes template with kubectl run or kubectl create from scratch. And you need to do this in every up to every second question.

Do not forget to run source ~/.bashrc after you have modified the .bashrc.

Before we sum it up, another lifesaving tip from my side. When using kubectl run or kubectl create, always provide the target namespace with –namespace. This saves you from deploying to the wrong namespace when you forget to switch to the correct namespace with the kn alias.


I hope you find the insights and tips helpful. The Certified Kubernetes Administrator exam is challenging but should not be an issue for people working with Kubernetes daily for several years.



WordPress Cookie Notice by Real Cookie Banner