My experience with the CKA 2021

Ryan Fang
6 min readApr 22, 2021

If you didn’t know, Kubernetes or k8s is a container orchestration platform that manages container workloads across a set of VMs. Moving forward, containerized applications are becoming more relevant due to the fact that they consume less system resources and are easier to manage and deploy. The Certified Kubernetes Administrator (CKA) is designed to test your competency working with k8s by completing a series of hands-on questions based on real life scenarios. Here is how I passed the Certified Kubernetes Exam with a score of 88% on my first attempt.

The easiest way to pass the CKA, is to be a Certified Kubernetes Administrator.

Preparation Time Frame

Before we go into the study material, I just want to give you a sense of the time it may take an individual to prepare and pass the exam on their first try (Based on my estimation and experience).

My estimation of the time required for acquiring the CKA certification
Photo by Boxed Water Is Better on Unsplash

My Learning Stack

There are plenty of learning resources out there for the Certified Kubernetes Administrator exam. I’m going to share with you the resources I have personally used. I think the most important aspect about preparing for the CKA is reading the documentations, and practicing kubectl on the command line with a kubernetes cluster. You should practice daily if you want faster results. Here is my learning stack:

Certified Kubernetes Administrator Course on LinuxAcademy

This was the course I took to pass the exam. It covers most of the concepts tested on the exam. I used this course as an introduction to Kubernetes and to supplement my readings and practices.

killer.sh

Hands down the best CKA/CKAD/CKS exam simulator. It is definitely worth the money. I would not recommend going into the exam without going through it at least once.

CKAD Practices

Definitely go through this once, or twice. It is a set of scenarios to validate your knowledge using kubectl and writing yaml files for various kubernetes objects.

VM playground on Linux Academy/ACG

With a paid membership, you gain access to a set of VMs which you can use to host your own kubernetes cluster. This was the option I used for practicing kubectl and playing around different components in kubernetes.

I have also included additional resources at the bottom of the page in case you need exposure to more learning materials than the options I stated above.

Tips and Pointers

For the exam, there are many things I originally wanted to share with you but felt it would make the article too long, so instead I summarized the 4 most important tips and pointers for the exam which I believe anyone who is taking the exam should consider beforehand. If you want to speak to me personally about the CKA, feel free to reach out to me on Linkedin.

  1. Bookmark important documentations on your browser

Since you will be using your own browser, bookmarking Kubernetes documentation is a quick and easy way to save time.

2. Learn tmux

The exam terminal bugged out on me when I was about an hour in. It did not show anything I typed after that point nor did it displayed the output to my commands so I ended up panicking. Luckily I went through a very brief tutorial on using tmux, and I was able to bring up another terminal to finish the remaining questions.

Here is a video tutorial on tmux, as well as a summary.

3. Learn vim

If you have read other medium articles this should go without saying that vim is the default editor of kubectl edit and should be your go to editor of choice. I was a big nano user before passing the CKA, but after learning vim I stopped using nano. Spend 20 minutes and go through vimtutor at least once.

vimtutor

4. Set up your environment

On the exam you will be given access to several VMs which at one point you will have to ssh into. You will also have access to a notepad which you can use to record anything you want (Even write a medium article like this). I would highly suggest that you set up your environment in a certain way that is most comfortable for you.

echo "alias k='kubectl'" >> $HOME/.bashrc
echo ":set number paste tabstop=2 shiftwidth=1 expandtab" >> $HOME/.vimrc
echo "ETCDCTL_API=3" >> $HOME/.profile
echo "do='--dry-run=client -o yaml'" >> $HOME/.profile
source $HOME/.bashrc
Photo by Karsten Winegeart on Unsplash

Example Questions

Q1. How do you back up and restore an etcd cluster?

sudo etcdctl snapshot save <file> --cacert=$CACERT --cert=$CERT --key=$KEY
sudo systemctl stop etcd
sudo etcdctl snapshot restore <file> --data-dir <directory>
sudo systemctl start etcd
sudo systemctl daemon-reload

Q2. How do you upgrade kubeadm, kubectl, and kubelet on a worker node?

kubeadm upgrade apply (control plane)
kubeadm upgrade node (worker node)
apt-get install -y --allow-change-held-packages kubeadm=1.20.1–00 kubectl=1.20.1–00 kubelet=1.20.1–00

Q3. How do you fix a broken worker node?

Typically worker nodes are broken due to the kubelet service malfunctioning. A common cause is because the kubelet service was not enabled/started on the server.

sudo systemctl status kubelet
sudo systemctl enable kubelet
sudo systemctl start kubelet
sudo systemctl daemon-reload

Though sometimes this may not be the case, you can inspect kubelet logs using journalctl.

sudo journalctl -u <service-name>
Press Shift+G to scroll to the bottom of the log where the most recent event occurred

Closing thoughts and other study materials

The CKA is a fair and relatively straight forward exam. If English is not your first language (or even if it is), definitely read the questions twice because there have been times when I was confused by what the question is asking for. If you practice daily you should have no issue finishing the exam with time to spare.

Competence brings forth confidence

As promised, here are some additional study materials I have found from other sources which I have attached my own personal opinions to so you can best judge what you need to pass the exam.

Kubernetes the hard way

Though I did go through Kubernetes the hard way once, after the exam I realized that it wasn’t necessary to create a kubernetes cluster from scratch unlike other guides suggest. This is because on the exam there isn’t any in-depth questions asking you to install different components from scratch. However, I would still recommend reading it once to get a better understanding of what is going on behind the scenes.

Udemy CKA course or KodeCloud CKA Course

I am pretty sure these two courses are the same (because I did not take them). There are plenty of other articles praising this Udemy course or this KodeCloud course.

Katakoda

I have not used, but it was mentioned on some medium posts I’ve read come across.

Google Cloud VMs

You get $300 dollars in credit to host a set of VMs and gain access to the Google Kubernetes Engine to practice your command lines. This is the free option I would’ve used if I did not have access to ACG/Linux Academy VMs.

Photo by Edvin Johansson on Unsplash

Best of luck on your exam!

--

--

Ryan Fang

DevOps Engineer, 3X GCP, CK${A,D}, CJE, TA, Next, Express, Firebase