CKAD

I passed the Certified Kubernetes Application Developer exam recently. As is apparently a requirement, I must now blog about it!

In case you are not aware, the CKAD is a 2 hour CLI based hands-on examination that tests how well candidates can apply their Kubernetes knowledge to perform numerous tasks in a real kubernetes environment. In case you are not aware, Kubernetes is a highly popular container orchestration system that hits the sweet spot between being too complex for web applications and too simple for anything else.

As the search link above indicates, there’s no shortage of advice on how to pass the CKAD. I’ll refrain from repeating those and just share what I think hasn’t been discussed so far.

At the risk of stating the obvious, preparing for the CKAD is a two step process:

  1. learn Kubernetes
  2. practice for the exam

Learn Kubernetes

I learnt Kubernetes mainly through the material from learnk8s.io. My employer had arranged for their in-person training which was delivered by Daniele Polencic, whom I had met earlier at Kubecon Shanghai through my friend James Buckett. Daniele is a great instructor who knows Kubernetes inside out. And their material is top-notch. It’s focussed on giving you a strong understanding of the building blocks of Kubernetes instead of just helping you prep for CKAD.

As just one example, I found that quite a few resources don’t explain the relationship between Services and Endpoint objects. This relationship is really important since it’ll help you debug and diagnose various Service issues. The learnk8s material explains this in a very cogent way. There are many more such fundamental concepts that are glossed over in CKAD focussed material which are explained well by Daniele and team.

Practice for the exam

During my CKAD, I received 18 problems that I had to solve within 2 hours. That’s not a lot of time if you don’t have some hands-on fluency with Kubernetes. The best way to build fluency is practice!

I practiced with just these two resources:

Note that the actual exam was more difficult than these practice problems but not too far off.

The other thing I did was to have a set of bookmarks ready to go during the exam. Since it is allowed to refer to the kubernetes.io documentation during the exam, having a set of bookmarks to the relevant material was a big time-saver. With the amount of yaml boilerplate involved in kubernetes, you definitely want quick access to yaml templates that you can copy from the website into your exam terminal.

One weird trick

Speaking of yaml, you must set up your vim editor for yaml editing. At the start of the exam, I created a ~/.vimrc file with the following:

set ts=2 sts=2 sw=2 et
set list
syntax on
filetype plugin indent on

It is absolutely worth memorizing the above because you don’t want to be fighting with yaml editing during the exam. I haven’t seen set list mentioned in CKAD prep resources but I highly recommend it. That instruction makes vim render tab characters as ^I so that they stand out. The last thing you want is an invalid yaml due to a stray invisible tab character that you’ll struggle to find and fix!

The other vim tip worth remembering is to :set paste before pasting a bunch of yaml from the documentation. This prevents vim from indenting the already indented code that you paste from elsewhere. I realized this during the practice sessions where I’d spent way too much time just fixing indentation of copy/pasted samples.

One more trick worth sharing is to use kubectl replace --force when you need to delete and recreate a pod or other object. Saved me quite a few minutes!

Closing

Due to the format, this exam was more interesting compared to the usual multiple choice certification examinations. That however, does not change my view of certification examinations in general. I think IT certifications are great as a structured approach to learning a new subject. But they are not very useful as signifiers of subject knowledge that an employer can supposedly use in making hiring decisions.