DateOct 15, 2021

CKAD Guide: A Roadmap to Kubernetes Certification

🚧
Readers who want to get adequate knowledge on Kubernetes for their application deployments, especially people looking for a guide to pass Kubernetes Application Developer Certification. This post does not cover cluster management concepts but can be used as a starting point for Certified Kubernetes Administrator (CKA) exam as well…

So recently, I achieved CKAD certification in which I scored 96 out of 100. Since then a number of people have inquired me about the various sources I used and even the exam itself. So I  thought of writing a post encapsulating everything I suppose is key to passing the exam.

In order to score well, not that it matters much, as qualifying marks are 66 out of 100; You need to focus on the following few broad categories -

  1. Containerization basics
  2. Linux terminal commands and utilities (VIM)
  3. Kubernetes Resources API

Let's look at each of them, one by one. I won't be discussing the individual concepts in detail, instead, I'll attach the sources where you can get more wholesome material on the topic. But first, let me tell you about the exam itself.

About the CKAD Exam

CKAD is one of the three exams, pertaining to Kubernetes, sponsored by Linux Foundation. This particular certification tests one's ability to incorporate Kubernetes support in your application and not necessarily actual management of a Kubernetes cluster (we have CKA for that).

This exam is completely practical and does not have any MCQs or subjective questions. We get a virtual machine terminal with 4 attached clusters and multiple namespaces. We then need to create/modify Kubernetes resources as directed in the questions. Speed plays a critical role as you need to solve 15-20 questions within 120 minutes.

In order to apply for the certification, visit -

🔥
Keep in mind that you don't need to pay the whole registration fee. You can always find referral coupons on the internet. I was able to get a 20% discount on registration fee. You can find coupons in the below link...

Once you register, you get -

  1. Access to Linux Foundation(LF) training portal(link)
  2. Access to 2 killer.sh practice tests (make sure to make the most of these⭐)
  3. 2 attempts at CKAD exam

If you fail to qualify on your first attempt, you get a free retake. Make sure to read all the terms and conditions carefully.

I would also suggest skimming through the CKAD candidate book. But this can be done at later stages of preparation -

Next, let's look at what you need to practice from containerization's point of view.

Containerization - Docker

Containerization is defined as a form of operating system virtualization, through which applications are run in isolated user spaces called containers, all using the same shared operating system (OS).

Well, that's the google definition. Although I would suggest at least getting your containerization basic knowledge in check, in reality, not a whole lot is required if your aim is to only qualify for the exam. As a matter of fact, you only need to understand two things from docker -

  1. Image names
  2. Image tags

The only place where Docker images come into play(for this certification) is the image field in Pods, Deployments, and Jobs.

Once you understand the above two concepts suitably, you can move to the next heading.

Linux Commands and VIM

Commands

Speed is key...Get acquainted with Linux shell.

You'll mostly be using the below Linux commands -

  • grep
  • cat
  • awk
  • kubectl

VIM

Code editors such as VS Code and Atom have pampered us for easier User Interfaces. But they are not available in the CKAD environment. I suggest spending some time getting familiar with the VIM editor.

Yes, there will be a notepad, but it's not of much utility.

Surprisingly not many people know how to copy-paste in VIM (myself guilty a while back). VIM has a host of bindings for various tasks. At least learn the following ones -

  1. Inserting text at a location
  2. Deleting a line
  3. Multi-line copy-pasting.
  4. Multi-line deletion
  5. Multi-line indentation shifting

Below is a great video for learning VIM basics. Learning VIM basics is critical for any DevOps work where you don't often get to use an Integrated text editor.

Kubernetes Concepts

Once you have the basics ready, we can move to the actual crux of the matter. For starters, you can read my below post -

Below is the syllabus for CKAD -

TOPICWEIGHTAGE
Core Concepts13 %
Configuration18 %
Multi-Container Pods10 %
Observability18 %
Pod Design20 %
Services & Networking13 %
State Persistence8 %

Learning

For learning, I found the following sources to be of great help. Agreed that a lot of content in the sources is duplicate but hey! Nothing bad in reinforcing what you have already learned. A combination of the below resources and official documentation is suggested.

Videos

Courses

Below are some of the courses you can refer to. Many companies provide corporate access to their employees for these platforms. That is one way to avert the cost.

Practicing

Practice Setups

Since this is a completely practical exam, getting your hands dirty is a must. You can use the below methods to set up a practice cluster

  1. Katacoda - Suggested ⭐
  2. Minikube
  3. GKE Cluster using free Google Cloud Credits
  4. EKS Service on AWS using Free tier program
  5. AKS service on Azure using free cloud credits

Question Banks

Referring

🔥
Make bookmarks out of the below documentation links. Although you can open only a single tab, no one is stopping you from clicking bookmarks. This is generally faster than searching for a particular Kubernetes Resource.

Ideally, you should be reading the whole Kubernetes.io documentation. But for the most part, you'll only need to refer to the following pages -

  1. Pods and Jobs
  2. Deployments
  3. ConfigMaps and Secret Maps
  4. Persistent Volumes and Claims
  5. Liveness and Readiness probes
  6. Security Context
  7. Network Policies
  8. JSON Path Support

Some Tips and Tricks

Make sure to do the below configurations at the beginning-

VIM settings

# Create vim config file
vim ~/.vimrc


# Add below lines to the file
set tabstop=2
set expandtab
set shiftwidth=2

Aliases ⭐

You can learn these but that's really not necessary as you'll get a hang of it after frequent use.

alias k="kubectl"
alias kns="kubeclt config set-context --current  --namespace"
alias kdp="kubectl describe pod"
alias kdd="kubectl describe deployment"
alias kdf="kubectl delete pod --force --grace-period=0"

# Below varialble to be used while generating yaml file
export do="--dry-run=client -o yaml"

My Notes

Ok, I'm not sure about this one, but here are all the notes I made during my preparation. These are raw and you may find it a bit arduous to understand.

Notes made during learning

Notes made during practice

Pardon me talking to myself. I have a habit of writing in 3rd person.

Finally

Preparing for the CKAD exam will propel your abilities as a DevOps Engineer. Kubernetes is a highly sought-out activity in the industry.

You will learn about how various components of computing infrastructure come together to support a product. This will require fine-tuning resource requirements, managing network, and user accesses, etc.

Every company wants its product to be resilient. You can help them achieve that!

Well then, until next time...