How to Pass the CKAD (or how I passed the CKAD)




TLDR 

The CKAD isn't an easy exam, but studying for it will teach you valuable skills for container management as well as Linux command line use. There are a number of helpful resources, but if you are studying to pass the exam you don't need to know everything.
 
I wasn't able to find a core list of recommendations as to how to prepare when I went to prepare for the exam or simply learn Kubernetes (aka k8s) well, so I've created a list here of core skills that I discovered are necessary. This includes getting a lay of the land via initial reading, finding hands-on practice materials, and specific commands or resources you'll find valuable during the exam itself.

What I Did

I wasn't sure where to start, so I got tons of recommendations from people I know who had already passed. Some of the recommendations were to read various docs, setup minikube, and do some courses as well as to practice large sets of problems on my local terminal.

I ended up doing quite a lot of studying and then decided to take the exam since I knew you get two tries so I could always take it again after the first shot.

I failed! I came within 10% of passing but didn't quite make it.

When I went back to study for the second round I had a much better idea of what I needed to focus on. A lot of what I studied initially wasn't what I needed...

So I just refocused on what was core to the exam.


The Real Question

There are a lot of areas to study, but the question you'll probably have is "How do I know that I'm ready?" 

I found that I needed to prepare in three steps to be comfortable with the exam questions:

  1. Know the pieces of Kubernetes and how they fit together 
  2. Get hands-on experience 
  3. Increase your coding speed by doing practice tests while referencing the docs

Let's look at each of these below.


Preparation

Step 1: Know the pieces of the system and how they fit together.

Read an overview book or tutorial that gives you a high level of understanding. It's good to get a lay of the land and an idea of how things fit together to solve real problems before getting into all the details.

I found this Oreilly book very helpful in this area (thank you to my roommate who happened to have it). 


Step 2: Get the hands-on experience.

Now that you have an idea of what is covered, do practical exercises via a class or on your local machine. A class with exercises is great because it gives you those exercises in a similar format to the exam and covers topics in more detail.

The course I took had great labs for each of the concepts covered on the exam. That Udemy course goes at a discounted rate periodically. It's usually not more than $20, which is a steal for the benefits it gives you. 

Note: Some of the labs are slow or slightly broken. So I would set expectations accordingly. That being said, it's still the best resource I've found out there so far.

Tip: For any lab that creates a container that you can connect to (pods, deployments, services, etc) make sure you test the resource from the command line even if the lab does make you do that. Some of the exam questions require creating a resource as a first step. If you don't verify that you've done that correctly, then the subsequent steps will leave you with a mess to untangle.

Tip: When you work through the Udemy course it covers each topic/type of K8s object one at a time. For each topic, I would view the lecture, then head over to the K8s site and read the docs (concepts/tasks) before doing the exercises. Then you'll know where to look for help when you're taking the exam since you can use those docs during the exam!


Step 3: Increase speed!

3 Key Areas

When you forget a concept during the exam, you can use the K8s docs to find what you need. But to do that at a reasonable speed, you need to get familiar with those docs.

There are three key areas to read and know well enough to navigate quickly:

  1. cheatsheet - Contains imperative commands in case you forget (i.e. how to view logs). 
  2. concepts - Introductions to each object type, when to use them, and how to create them.
  3. tasks - How to use the object types together to build out applications (this shows you how to do common tasks one piece at a time. For me, this was the most valuable reference during the exam since you can essentially just copy some of the examples and replace a few lines to solve many questions. Make sure you know how to use the search feature to find examples of concepts (i.e. configmap) as search result links show you how to build out almost anything you'll need. Knowing the right keywords to search for saves you when you have limited time left on the exam clock.

Commands to Memorize

You'll need to have some commands memorized so that you don't have them look them up often as that can steal your precious time during the exam.


You don't want to type "kubectl" all the time, so use k as a stand-in.
alias k=kubectl

Pipe any command into a yaml file so you can modify it before creating an object.
--dry-run=client -o yaml > tempfile.yaml

Get more information for an object without having to look through the "describe" command output.
k get pod -o wide

Create an object from a file.
k apply -f tempfile.yaml

Open an object configuration as a yaml file for editing.
k edit pod

Search for a case insensitive string in all the objects of a type and include 10 lines buffer around the results for context. 
k describe pods -n mynamespace | grep -i -C 10 searchstring

Read the help docs. These are also great to grep.
k expose --help

Decode a secret. Without the --decode flag this encodes the secret.
echo '1234' | base64 --decode

Get pod performance information.
k top pod

Download a webpage file.
wget 
google.com

Get the content of a page.
curl google.com

List files with details in *nix.
ls -la

Print a file's contents to the terminal:
cat myfile.yaml

Execute a command in a pod.
k exec mypod -- ls

Create a service for a deployment/pod.
k expose deployment mydeploymentname

Do the Mock Exams

To get fast at creating objects make sure you do all the tests from the Udemy course multiple times until you have them memorized. 

Side note: For the Udemy course, the "Game of Pods" lab/exercise wasn't very valuable and was somewhat broken. I just gave up on that one.

After the Udemy course tests, I would do the Killer.sh mock exams and make sure you understand all the questions. Of course, always verify each change you make. It's easy to create a pod in the wrong namespace and never realize that you've done so if you don't check by listing all the pods in the namespace your new pod is expected to be in.


Tricky Areas (To Be Careful With)

There are some areas that you are almost sure to encounter, and won't be easy to figure out without some specific practice beforehand.

Network Policy 

This is a tricky one you might have to diagnose if pods are not communicating as you would expect them to.


Ambassador/Canary/BlueGreen

It's common to need to set one of these up or to just tweak services so that a pattern is achieved. The good news is they don't require any special objects.


Affinity 

Node affinity along with taints and tolerants are attributes you might need to change specifically or something to investigate if there is a deployment problem you are attempting to identify.


Services 

It's a sure case that you'll need to configure or create services. Luckily, many flavors of these can be created via the expose command. Be sure to know the differences between the different service types and how to test each from the command line after making a change.  

Docker/Helm

These are not covered in the K8s docs so you'll need to go to the respective sites to learn about them. Doing the beginner tutorials on each site should be enough to be prepared for some basic exam questions.


Extra Notes

Don't Pay Full Price

The exam isn't cheap! I didn't realize that there were coupons available, so I paid more than I needed to. I'm still sad about this months later (insert sad noises). Just do a quick search for discounts and coupons. Some discounts can be more than 20-30%

e.g. https://devopscube.com/kubernetes-certification-coupon/

You Get Two Attempts

Remember that you get two attempts to pass the exam for the one exam purchase fee.

This also includes two Killer.sh sessions!


Final Words

If you want to learn about Linux/Docker/K8s/Helm then the CKAD is a great way to go. Studying for the exam will mean that you'll have to explore each of these topics with enough depth to have a good idea about how they work and what types of problems they can be used to solve.

Preparing to take the exam is a lot of work. I had experience with k8s professionally before studying for CKAD and found out that I still had to learn a lot.

However, if you follow the above recommendations then you should have a good shot on your first try.


Remember

* The Killer.sh sessions will give you a good idea as to how prepared you are for the real exam.

* Always test your object changes using curl or wget whenever possible. That will tell you if something has gone wrong with the access to your container. 

* You're almost certain to face Docker and Helm. Being familiar with the help/tutorial pages goes a long way as you can reference them on the exam.

* The questions on the exam are not in a particular order, so don't get hung up on one. It's better to keep going and secure points with easier questions. You don't have to answer them all to pass and the time goes quickly!


Resources

Good for CKAD Prep

Oreilly k8s Book - https://www.oreilly.com/library/view/kubernetes-up-and/9781492046523/

Udemy Course - https://www.udemy.com/course/certified-kubernetes-application-developer/)

Killer.SH Exam Simulator (You get two free sessions with the exam purchase) - https://killer.sh/


Materials You Can Use During The Exam

K8s site - https://kubernetes.io/docs/reference/

K8s Cheatsheet - https://kubernetes.io/docs/reference/kubectl/cheatsheet/

Docker Docs - https://docs.docker.com/get-started/

Helm Docs - https://helm.sh/docs/intro/



Comments

Popular Posts