Contents

My Guide to Passing CKAD & CKA Exams

CKAD & CKA are the most challenging certifications that I have taken in my professional career. Both exams require hands-on problem-solving skills and a fundamental understanding of Kubernetes. With good preparation and lots of hands-on practices, I managed to pass both exams with > 90% scores. I hope this post can give you some useful guidance in your preparation towards obtaining the certifications.

_____

 

My journey to obtain the CKAD and CKA started when I received an email from Linux Foundation Training in Nov 2018 regarding the Cyber Monday deal, in which I could get a 60% off the certification fee, and most importantly, I could also get a free limited-edition T-shirt along with my purchase. As someone who collects a lot of free tech-related swags and T-shirts, I found the deal really hard to pass by(!) and I decided to sign up for both of the certifications with limited Kubernetes knowledge and without knowing exactly what was required to prepare for the exams.

After months of procrastination and work-life distractions, it took me an email reminder about the certification expiry date before I started getting myself prepared and finally registered for the exam. I started reading about Kubernetes and also asked a few of my ex-colleagues who took the exam before me. They all warned me that the exam was tough and very challenging. Obviously, I asked them for some tips and tricks on how I could best prepare myself and I found their advice helpful in giving me some guidance for my preparation. This post is my way to pay it forward so that other people can benefit from my tips and tricks and thus be able to also obtain the certifications.

 

Preparation

The key to better prepare yourself for the exam can essentially be broken down into 3 parts.

1. Understand exam expectation & rules

On the certification page where you can register for the exam, you can also find a few resources that are essential for you to understand about the exam, i.e. the exam curriculum, the candidate handbook, and the exam tips. Read them in detail to get the level of expectation and understanding of how the exam is going to be conducted. The exam curriculum outlines the knowledge and skills that you need to demonstrate during the exam along with the weightage so that you can plan the focus area to prepare during your study.

Before the exam date, you should also prepare yourself to meet all the requirements outlined in the candidate handbook (e.g. web browser, room, personal identification) and understand the exam rules. The exam proctor is very strict and they have the right to terminate the exam if you engage in any misconduct or if you fail to comply with the exam requirements.

2. Time-saving optimization

CKAD and CKA exams require you to solve a set of problems using the command-line interface (CLI) within a tight time duration! Hence it is very important that you brush up your CLI and typing skills in order to optimize your time-saving when solving the problems. Anything that you know can help you to speed up your typing, you should remember it in mind, set it up, and implement during the exam. To give you a sense of how limited the given time is, during my CKAD exam I managed to finish all the problems with only 2 minutes left! Those were the remaining time that I could use to do my final review and made sure that everything was solved correctly.

Below are some of my tips to help optimize time-saving, and you may even have a few others based on your personal experience and preferences.

2.1 Optimize your shell experience

Here are some of the things I did to optimize my shell experience from the start of the exam before solving any problem.

2.1.1 Enable kubectl auto-completion

This is a no-brainer and I relied a lot on tab bashing to save me a lot of typing to complete the kubectl commands and also getting existing resource names from the Kubernetes cluster.

1
source <(kubectl completion bash)
2.1.2 Create shell aliases

Below are some of the shell aliases that I used a lot. I referred to oh-my-zsh kubectl plugin to come up with the list of aliases. As you do your practices, try to figure out the commands that you normally execute a lot, and then create your own aliases and familiarize yourself with them during the practice. Remember to apply them before you start solving any problem during the exam.

1
2
3
4
alias k=kubectl
alias kaf='kubectl apply -f'
alias kgp='kubectl get pods'
alias kgs='kubectl get svc'

2.2 Choose your preferred text editor and know how to use it well

Since I am not a vim expert, I prepared myself reading the vim cheat sheet, remembering the commands that I would use frequently (e.g. go-to line, delete line, etc), and also configure my vim to help me auto-indent the YAML during typing.

1
2
# in ~/.vimrc
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab

You should also learn how to run kubectl explain without leaving the vim in order to save you time from going back and forth whenever you need to read the documentation for certain resources that you need to type in the YAML file.

2.3 Do not hand-craft the YAML files from scratch

You can auto-generate the YAML file using kubectl command kubectl create --dry-run -o yaml

1
kubectl run nginx --image=nginx --dry-run -o yaml > pod.yaml

If you are asked to fix/troubleshoot existing resources, you can also export them into a YAML file using kubectl get -o yaml

1
kubectl get pod nginx -o yaml > pod.yaml
Note
Since v1.14, the --export flag is now deprecated.

2.4 Do not rely a lot on browsing the Kubernetes docs

During the exam, we are allowed to open one additional tab to access https://kubernetes.io/docs/, https://github.com/kubernetes/, https://kubernetes.io/blog/, and their subdomains. No other tabs may be opened and no other sites may be navigated to.

You may think that by having access to those links would save you from having to remember anything for the exam. I find that browsing the docs during the exam is actually the biggest time-waster, and you want to avoid having to do it as much as you can. Remember most of the object spec, resources, and attributes as much as you can. Learn how to use kubectl explain from the vim to find the specific doc that you need in case you forget about it during the exam. And should you need to rely on the Kubernetes docs, find out which section or search keywords that you need during the practice, and zoom in to the solution as fast as you can during the exam. For example, I used the Kubernetes doc to copy the PersistentVolume and PersistentVolumeClaim YAML instead of needing to remember them.

 

3. Practice, practice, practice

CKAD and CKA exams test your practical hands-on Kubernetes skills, and thus it is crucial that you prepare yourself by doing lots of practices and solving mock problems as many as you can. Practicing was the key success factor for me to pass both exams with high scores and helped me to understand the key Kubernetes concepts and built a better understanding. Practicing helped me to build muscle memory by recognizing certain types of questions and knowing how to solve them automatically. And importantly, practicing also helped me to hone my typing skills and remembering kubectl commands, object specs, and YAML definitions that you will repeatedly use during the exam.

The following were the resources that I intensely used during my preparation:

From the Linux Academy courses and the repo, I did the practice exams and exercises multiple times, even with increased frequency as the days went nearer to the exam date. There was even a point when I felt that I was sick of typing kubectl over and over again 😅

Tip

The exam curriculums have changed a few times since I did the exams. You may want to find other resources that might be up to date based on the latest curriculums. Especially to prepare for the CKA, some of the extra resources that you may consider are:

 

Exam Day

The night before the exam day, you should get a good night’s sleep in order to refresh your mind and solidify your learning. According to Matthew Walker in “Why We Sleep” book, sleep that occurs after exposure to new information fulfills the role of the brain’s “save button”, while poor sleep inhibits the brain’s ability to form memories. I did some minor practices the night before the exam day and focused on the areas in which I felt that I was still lacking.

You should also prepare well and set up the location where you are going to take the exam from, e.g. having a bottle of water and getting a comfortable desk and seat. The exam takes around 2 hours for CKAD and 3 hours for CKA and can be pretty intense. I personally booked a quiet meeting room and allocated some extra buffer time to accommodate unexpected events, e.g. proctor examining the room and your personal identification, technical issues, urgent toilet break, etc.

During the exam whenever you are solving a problem, make sure that you are setting the correct Kubernetes context to use the correct cluster and namespace. The command is given for each of the questions and you can just copy and paste it on your terminal.

Always generate the YAML files when you are solving a problem, either by auto-generating it from scratch or exporting it from existing resources (refer to 2.3). Structure the YAML files by putting them in directories for each question or come up with a convention that indicates the question number in the filename. Doing this will tremendously help you when you want to copy from the previous YAML files or come back to the question that you are stuck with and resume from where you left off. Utilize the given notepad to make notes for your reference throughout the exam.

If you are stuck at a particular question, skip it and come back later. Each question has a maximum score assigned and you should aim to solve those higher score questions that you can solve first. Lastly, be confident and remember that you have practiced yourself a lot before this and you should be able to cruise through the exam better.

 

Summary

Passing both the CKAD and CKA exams are the most satisfying certification experience for me. Both are hands-on and very technical, and I felt like I was solving puzzles when going through the questions. It is even more satisfying to know that I pass both exams with flying scores: 99% for CKAD and 91% for CKA (note: I was totally blank and could not solve one question in the CKA). And most importantly, I can now feel very proud when wearing my free T-shirt at work 😏

 

/images/2020/20200425-my-guide-to-passing-ckad-and-cka-exams/ckad-swag.jpg
My CKAD T-Shirt

 

Like what you read?
Did you find this article helpful, or save you time? You can thank me with a cup of coffee — thank you!
Buy Me a Coffee at ko-fi.com