How to pass Certified Kubernetes Application Developer (CKAD) Exam
Tags: kubernetes, devops, cloudnative
Published: 2021-04-30 14:28:38

CKAD is a tough 2-hour long exam focusing only on exercises and challenges to be fixed in a real k8s cluster environment. Only practical questions in a terminal with a short time-frame. Here's some magic how I managed to ace it for the first time.

## Why is it so tough?
- You have to carry out 19 exercises in 2-hours (yup, roughly 6 mins per challenge). This means you'll have to be fast and on the point. Also you need to complete 66% to pass. To simply put it: Your k8s knowledge has to come from muscle memory. There is no time to read up on forgotten topics.
- It's a proctored exam meaning you'll be watched through your webcam however you can't see or hear the proctor. You can have access to the proctor through a chatbox. You can only have 2 Chrome tabs open. First is the exam, second is the official docs. This created an interesting tension for me from the beginning. So be prepared to find your inner peace ☮️

Kubernetes is using a LOT of objects and also has a LOT of commands to really get what you want. So how to make your k8s knowledge as if it were muscle memory? That's where I used...

## Anki, anki, anki
Have you ever used flash cards for learning? No? You should give it a try right now! This is my 🪄 secret magic 🪄 to keep up with all types of tech-related knowledge I'm bumping in. Check [Anki's website](https://apps.ankiweb.net/) it's completely free. It has a [great documentation](https://docs.ankiweb.net/#/) and also [explaining Videos](https://docs.ankiweb.net/#/getting-started?id=videos). 

Using this tool for me is like defining your own advertisements. When you're binge- watching TV you get a lot of commercials which are simple, short and well-repeated. That's why you can remember them easily after so many years!

Now imagine your life is a movie... Also that you can create your own ads, but the content for these are actually helping you to master new things. Also, this is better than "telly" because you can control when these ads are showing up! So when I'm noticing just a 5 or 10-minute period in my day where I have nothing to do (this could be either; waiting for a bus; waiting for someone; waiting for the build 🤔 etc.) I will review one of my decks on my phone. Because Anki also has apps compatible with all kind of devices with cloud sync. This is a really great way to learn and there are no more excuses such as "I don't have enough time" or "Ohh shoot.. I have my notes on my other device". [Check out the docs](https://docs.ankiweb.net/#/) to find out more.

Getting back to Kubernetes, you don't even need to create your own Deck (set of cards). Because that step usually takes a lot of time before you can actually start learning (revising cards). There is already a shared deck called [CKAD Prep exercies](https://ankiweb.net/shared/info/959373608). Use it, update or extend it as you discover new things!

Revising these cards will make you remember to the most important commands/switches and concepts which I'm going to note just down below.

## Imperative commands, docs, self-checks

As I said you don't have a lot of time to think. So it's better to cover everything you can with imperative commands because they're real time-savers. 

- Use `kubectl run` as often as you can. Almost all switches [provided with it](https://www.mankier.com/1/kubectl-run) are pretty useful. Take time to see what are these doing: `--annotations`, `--env`, `--labels`, `--requests`, `--limits`, `--serviceaccount`, `--port` and `--expose` 

- [kubectl create](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#create) is also a key player in this time-saving game.

- Combine the `run/create` command with `--dry-run=client -o yaml` so you can get a preview what you're about to do. Also, you can pipe this into a yaml file and modify further.

- There are several objects which you can't create through imperative commands. This is the point where you need to **read carefully** the official docs. If you familiarize yourself with the articles there, the quicker you find important pieces like this section on [Persistent Volumes](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) or this on [multi-container pods](https://kubernetes.io/docs/tasks/access-application-cluster/communicate-containers-same-pod-shared-volume/). As a general rule of thumb, objects that can't be created with run/create should be copy-pasted out from the docs. 

- For the sake of the exam don't take too much time in official docs on topics which are not part of the [CKAD_Curriculum_V1.20](https://github.com/cncf/curriculum/blob/master/CKAD_Curriculum_V1.20.pdf).

- Self checking is also important. In the real exam environment you won't see whether you performed one task good or not, you have to check it for yourself. You only see the weight of each task in %. This way you'll be able to see quickly if you have already reached the 66% to pass or not. For example if you created a service containing `nginx` pods you want to make sure if you do a `wget -O- service:80` it works. So prepare to use heavily `describe`/`get`/`exec` and `logs` to check back your results. 

## Further helpful resources
Just a list of bookmarks I kept in my Chrome which are contributed to my success in a huge way. You can boost your learning with these big time 🔥

- [https://github.com/saaguero/ckad-notes](https://github.com/saaguero/ckad-notes)

- [https://github.com/dgkanatsios/CKAD-exercises](https://github.com/dgkanatsios/CKAD-exercises)

- [A really good write-up with a lot of tips here](https://towardsdatascience.com/pass-ckad-certified-kubernetes-application-developer-with-a-score-of-97-af072a65f1ce)

## Summary
I hope you find what's written here useful, and it helps you to get a better understanding on your journey. Go && Ace that exam!

I would honour your feedback about this post in the comments section below. ⬇️⬇️⬇️ Feel free to write in case of any questions. You can also ping me on Twitter: @jozsefDevs. Have a wonderful day!