Become a Certified Kubernetes Application Developer (CKAD)

A few days ago, I achieved one of my milestones for 2020: I wanted to get a decent understanding of Kubernetes and demonstrate that knowledge by becoming a Certified Kubernetes Application Developer!

The following list details what you can expect from this article. Feel free to continue reading or skipping to one of the following sections:

Kubernetes (or Kube, or k8s for short) has attained massive popularity in recent years and seems to have been adopted by organizations small and large as the defacto tool for running applications in “production.”

At MongoDB, the group I’m part of develops two Kubernetes Operators: community and enterprise. According to the official documentation, “operators are software extensions to Kubernetes that make use of custom resources to manage applications and their components.” Operators are not part of the Certified Kubernetes Application Develop (CKAD) curriculum, but if you’re interested you can read more about them here.

I was exposed to Kubernetes in my current role and got drawn into it for various reasons:

There are many more benefits. Of course, nothing is perfect, and Kubernetes has plenty of tradeoffs just like any other system; I’ll save this for another day. Ultimately, I decided Kubernetes was a tool that is here to stay, and I would benefit from understanding it!

I approach certifications as an opportunity to deepen my knowledge in a particular subject. Most certification exams require learning a few topics to a level that permits you to answer a series of multi-choice questions well enough to get a passing grade. Many developers and managers today have a neutral or even negative view on “getting certified.” Some go as far as to say certifications are a net negative on your resume.

I found that spending the effort usually leaves me, at the end of the learning journey, with more knowledge than when I went in. For me, the following process works well:

When I decided to attempt the CKAD, knowing very little about this certification, I expected a similar process: studying followed by a multi-choice exam… how wrong was I!?

The certification’s landing page states: “The online, proctored, performance-based test consists of a set of performance-based items (problems) to be solved in a command line and is expected to take approximately two (2) hours to complete.

Ok, so now what? All of a sudden, I realized that CKAD was a practical exam! I would have to solve actual problems in the terminal, not memorize concepts, and try to guess the correct answers. I was intrigued!

Armed with curiosity, I started digging around for learning materials, courses, practice exercises, mock exams, tips, etc.

In the following sections, I have compiled an exhaustive list of resources that will help you learn all the concepts tested in the CKAD curriculum and obtain a successful result!

Disclaimer: At this time, the exam runs on Kubernetes 1.17. Some of the following tips and courses may become obsolete, in time, as the curriculum is updated.

Step 1: Study

If you are new to the Kubernetes world, start with the free LFS158X — Introduction to Kubernetes course offered on edX. Next, have a look at this list of learning resources. Optionally, you can take this paid course about scalable microservices in Kubernetes on Udacity.

With some prior knowledge, you can skip straight into a course which primarily focuses on the CKAD curriculum:

I took Benjamin Muschko’s course and was very happy with the content’s quality — an excellent mix of theory and practice exercises. I attempted a second course but quickly relented as I found the materials similar enough not to justify the time investment.

Plan to spend 2–3 hours a day for about a week to complete this step. I want to clarify that all the courses listed above are paid. If you do not have a budget for a video course, skip to the next section.

Step 2: Practice

In my opinion, you should spend most of your efforts solving problems on the command line. As the exam is a practical one, you need to be able to use the CLI tool (kubectl) to perform all kinds of tasks. Even without taking an introductory course, you will be able to pass the exam by practicing all the exercises from the following resources.

Many sites offer paid exam-like questions. The resources listed below are free; I suggest practicing as many exercises as you can, more than once, before looking at paid ones.

In the future, the CKAD curriculum may change, and these sites may not keep up-to-date. In that case, consider paying for exercises.

Some of the above links to paid courses or resources — I will discuss what I decided to pay for, below.

Spending as much time as possible at this step is by far the best Return on your Investment!

You will need a fully functioning Kubernetes cluster while you practice. See the Bonus section below for a few options.

Plan anywhere between 1–4 weeks at 2–3 hours a day, depending on your experience. When you reach a point where you can comfortably solve any of the exercises linked above — you are ready to take the exam!

One crucial piece of advice I can give you is always to practice these as if you were in the exam:

Step 3: Exam prep

The exam itself runs in an interactive terminal inside of a browser window. You are allowed to open only one more browser tab; you can only use it to consult the Kubernetes Documentation or the Kubernetes GitHub project. I cannot think of a reason why the latter would be helpful during the exam, but it is available to you if you need it.

I won’t go into all the details about the exam environment, as they are likely to change — at the time, find an updated copy of the Important Tips for CKA and CKAD page — it will also be shared with you once you’ve registered for the exam.

At this stage, you can attempt a mock exam (paid). You will be surprised just how difficult it is to go through with an exam in a browser-based environment, with an unconfigured shell and text editor!

Here are a few options:

I used killer.sh, which, in my opinion, was well worth its cost. I passed on the first try with 97%, which I attribute to going in prepared.

The bottom line is that you don’t need to pay for one if you feel confident enough in your skills. The CKAD exam (currently) allows one free retake, and you could always use your first attempt and only invest more time and money if you have failed it.

Tips and Tricks

  1. Set-up kubectl auto-completion in the shell

Configuring this feature will avoid you having to copy-paste resource names in kubectl. It will speed you up!

2. Define aliases (and get used to them beforehand)

alias k=kubectl
alias kx=kubectl explain
alias kcf="kubectl create -f"
alias kdf="kubectl delete -force --grace-period=0"
alias kdff="kdf -f"
alias kns="kubectl config set-context --current --namespace"

3. Edit ~/.vimrc and set the following options, which will allow you to paste YAML without having to reformat tabs.

set tabstop=2
set shiftwidth=2
set expandtab
set number relativenumber

The “set number relativenumber” option lets you quickly determine the desired number of lines to copy or delete, without having to compute it yourself.

In the following example, if you wanted to delete all lines starting from the cursor up to ‘delete until here,’ you would type: 2dd (where ‘2’ is the number shown in front of the line.)

Screenshot showing relative line numbers in ViM.
Screenshot showing relative line numbers in the Vim editor.

4. Learn Vim! Seriously! Your ability to manage time during the exam dramatically depends on it! At the very least, you should be comfortable with:

# enter insert mode
i
# save and exit
ZZ (or :wq!)
# do not save and quit
ZQ (or :q!)
# delete line
dd
# copy line
yy
# paste line
pp
# delete, copy, or paste 5 lines
5dd, 5yy, 5pp (5 is just an example)
# go to the beginning of the file
gg
# go to the end of the file
shift+g
# select multiple lines
:shift+v, press up/down to select lines
# indent left
shift+,
# indent right
shift+.
# indent again (either left or right, last operation)
.
# replace all instances of 'foo' with 'bar'
:%s/foo/bar/
# delete all contents from cursor to the end of the file
dG
# undo/redo last change
:undo, :redo
# delete all from cursor to end of line and insert
shift+c
# jump to the first letter on the current row
shift+i
# jump to the beginning of the next word
w
# jump to the beginning of the previous word
b
# toggle line number/relative line numbers
:set nu! rnu!
# convert all tabs to spaces
:retab

You can, of course, use other editors such as Emacs or nano. I’m not saying that you need Vim per-se. I am advising you to know a text editor really well!

5. Learn kubectl

This tool is the bread-and-butter of the exam. Master it! Be super comfortable with at least the following:

# generate yaml without applying it
kubectl create ... --dry-run -o yaml > a_file.yaml
# explain kubectl options and API resource spec
kubectl explain [--recursive] ... # e.g. 'pod.spec'
# create a pod
kubectl run --restart=Never --image=...
# create various resources (faster than searching the docs)
# (but not all resources supported)
kubectl create -h
# see resource usage
kubectl top pod
# see available contexts and the configured namespace for each
kubectl config get-contexts
# set the namespace to use for the current context
kubectl config set-context --current --namespace NS
# see a pod's logs
kubectl logs POD-NAME
# find resources in all namespaces
kubectl get --all-namespaces ...

Step 4: Taking the exam

Before scheduling your exam, you should know that becoming a supporter of The Linux Foundation (currently 50$) will give you a 100$ discount on any of their exams; CKAD is one of them, but there are more. Supporting the Linux Foundation pays for itself from the very first exam you take! The discount subsequently applies to any other certification such as CKA, LFCS, etc.; win-win!

Make sure to allow at least 30 minutes extra for the exam — the exam platform and communication with your proctor could be better. You will spend some time before the exam starts, verifying your identity and showing your immediate surroundings.

Once you do start the exam, time will be flying! You have 120 minutes to solve 19 exercises, leaving you with a little over 6 minutes per exercise. Some are fast to solve, but others require at least a few minutes. Making a mistake and needing to investigate issues or consult the documentation eats into your overall time.

Also, check how much each question is worth (each item displays this information). Some of the questions worth 2–3% are quite long; flag those to return to them later and move straight to ones with the highest “payout.”

Every exam question displays a command for selecting a context. The CKAD environment consists of four such contexts. If you do not connect to the correct cluster (context), your submission will not count! Each context comes with no namespace predefined — which is the same as using the ‘default’ namespace.

One common mistake is working in the wrong namespace. Get used to specifying namespaces for each kubectl command (slow) or update the default namespace for your current context (fast, but see my notes below).

# Option 1: always specify a namespace
kubectl -n pluto ...
# will execute the command in the 'pluto' namespace
# Option 2: update the current context's namespace
kubectl config set-context --current --namespace neptune
# will by default use the 'neptune' namespace for kubectl executions

Note: I like Option 2. During my exam, I came across a few questions that did not specify which namespace to use. I assumed ‘default’ was the correct one and I was right.

Note 2: An hour into the exam, I started having a hard time focusing on questions (too much kubectl this, kubectl that.) If you take one thing out of this section, let it be this: find ways to simplify the actions you must take! For me, Option 2 above was one such strategy. Another one was to rely on kubectl create — dry-run -o yaml to get me 90% of the way and then edit the resulting yaml to achieve the desired result.

You do not have time to read docs! It’s best if you know what you’re looking for ahead of time, and need only to search for the appropriate YAML spec. Having limited time is also why knowing your editor is very important; you will ultimately have more time problem-solving!

However, do get used to using the search functionality from the Kubernetes Documentation. Know these pages well enough to find what you’re looking for during the exam quickly!

Doing mock exams helped me! During a practice session, I ran out of time before completing all the exercises. This helped me realize what concepts I did not fully grasp and allowed me to correct that. The passing requirement for the exam is 66%, which feels pretty easy to attain with enough practice (see Step 2).

If I hadn’t invested in a mock I expect I would have still passed the certification exam, but with a lower score.

Summing up, here is what you need to do to pass the CKAD exam:

Have a good reason!

Without one, you may struggle to take in all the required knowledge. My reasons were:

Study

Learn about Kubernetes as a whole and concepts tested in the CKAD exam.

Practice

Command-line experience with kubectl is by far the most critical step and the one that gets you the skills you ultimately want!

Develop an exam strategy

Take the exam

“If at first you don’t succeed, Try, try, try again!”

— Thomas H. Palmer

Good luck! And please get in touch and let me know your exam experience!

— Mihai

Bonus

See below a few other resources that may come in handy during your practice sessions.

  1. Join the Kubernauts Slack; it is a friendly community geared towards studying and passing the CKA/CKAD certifications — they have a plethora of resources and advice on passing any of the Kubernetes exam(s).
  2. Use minikube to practice locally (at no cost).
  3. Sign-up for Google Cloud; you get 300$ in free credit, which gives you the ability to spin-up multi-node, production-ready Kubernetes clusters. For CKAD, you will not need to know how to set-up Kubernetes clusters from scratch.
  4. Try Kubernetes Labs, which lets you play with Kubernetes for free. They provide practice clusters, which you can use for a limited time, after which they are reclaimed.
  5. Also, try Kubernetes Playground (Katacoda) — this is, however, a paid service.

About the author

I am a software engineer turned manager with 15 years of experience working on backend and frontend projects, in various programming languages and technologies, in companies ranging from start-ups to enterprises. Presently, I am a Software Engineering Lead at MongoDB, running the Ops Manager team in Dublin, Ireland. I welcome all opportunities to network with fellow software engineers! You can find me on LinkedIn, Twitter, or GitHub.

--

--

Software Engineer at heart, Manager by day, Indie Hacker at night. Writing about DevOps, Software engineering, and Cloud computing. Opinions my own.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Mihai Bojin

Software Engineer at heart, Manager by day, Indie Hacker at night. Writing about DevOps, Software engineering, and Cloud computing. Opinions my own.