How to prepare for the Certified Kubernetes Application Developer (CKAD) exam

If you are reading this, you're likley preparing for the CKAD exam. I'd like to help you prepare for it by sharing the tips I wish I had before taking the CKAD exam.

Certified Kubernetes Application Developer badge

Tip # 1: It's hands-on

Unlike other industry certifications such as the AWS Solutions Architect Associate, the CKAD focuses on practical exercises. You'll be given access to a remote environment with various Kubernetes contexts that you need to switch between. Make sure to get comfortable with the kubectl command line interface. In this exam, your ability to create and troubleshoot Kubernetes deployments is more crucial than understanding every detail.

Tip # 2: Know the Question Types

The CKAD has specific question archetypes, and becoming familiar with them in advance is essential. If you think about it, the range of situations the exam can test you on is finite. Therefore, it's vital to practice the most common question types. I guarantee you'll encounter these question types:

Creating a Deployment

A Kubernetes deployment (opens in a new tab) is the base pattern for deploying applications. While the exam might require you to launch a Kubernetes pod (opens in a new tab) to check if an application is running, it's more likely to ask you to create deployments rather than pods.

Debugging a Deployment

The exam environment will present you with a failed deployment that you can observe using kubectl get deployments. In this question type, the number of pods requested by the deployment might not be fulfilled, and it's your job to find out why. An example scenario could be that the YAML specification for the deployment correctly specifies replicas: 3, but the deployment status shows 0/3 available. A great first check to debug is to ensure that the selector label specified in the deployment matches the label given to the pod's metadata.

Debugging a Service

In this question, a Kubernetes service is deployed but it doesn't respond to requests. Be sure to differentiate between ClusterIP and NodePort services.

For a ClusterIP service, you should confirm that a request works by running e.g. curl myservice.mynamespace.svc.cluster.local within a pod in the same namespace. For a NodePort service, you can directly send a request through the terminal without a pod.

A service must always have endpoints, which you can list using kubectl get endpoints. If no endpoints are listed for the service, the selector attribute for the service could be misconfigured which results in it being unable to find matching pods.

Creating a Network Policy

You'll have to write or edit a network policy (opens in a new tab). The goal of this exercise is to either enable or limit the communication between pods in a servce. The key for this task is knowing how to combine multiple ingress and egress rules that work as logical OR and AND. This is conceptually straightforward but it can get tricky syntax wise.

Using a Config Map

You'll need to know how to use config map values in pods. This isn't very difficult once you understand that the configuration fields valueFrom and configMapKeyRef can be used for environment variables in pods. This would be part of a question rather than a standalone exercise.

Mounting Volumes and Using Secrets in Pods

This exercise is fundamental not only for the exam but also for working with Kubernetes. There are two ways to use a secret (opens in a new tab) in a pod: as an environment variable or by mounting it as a volume. You should practice both for the exam because you'll likely encounter this in more than one question. This is one of the "easy" question types because the required YAML configuration is short.

Tip # 3: Focus on Speed

Having the right answers to the exercises isn't enough; you must solve them in a timely manner. Some non-Kubernetes skills are useful in this regard:

  1. Touch Typing: The exercises are conducted using the terminal. Being able to type quickly allows you more time to develop your solutions for each question. However, favor copy-pasting over typing. A typo can cause your solution to fail even if the approach is correct. If the typo is hard to spot the error can be confusing and make you believe the problem is elsewhere. If you're not a touch typist, I recommend some practice on a website like typingstudy.com (opens in a new tab)

  2. Aliases, Short Flags, and History: Save time by creating aliases for commonly used words and commands. The most used command in the exam is kubectl. It's useful to shorten it by running alias k='kubectl' in the terminal. Prefer using the short version of flags when running kubectl commands. For example, it is faster to get help for creating a deployment using k -n someSpace create deployment -h instead of kubectl --namespace someSpace create deployment --help. Go through previously run commands in the terminal using the arrow keys, the history command or reverse-search (opens in a new tab) instead of typing a command again.

  3. Text Editing: The remote environment has basic Linux text editor programs installed. If you're not already familiar with Vim, become comfortable with navigation, text search, and general text editing. You don't need advanced features like macros or embeddd shell commands.

  4. Linux Pipes: Let the command line do work for you by letting text flow from one program to another. For example, if you need to examine the definition of available deployments, use: k -n someSpace get deployments -oyaml | vim --. This allows you to quickly inspect resources with all the features of a text editor. Another useful pipe is to search for strings in files like cat pod.yaml | grep -i wantedString. Consider creating temporary files that combine the contents multiple files with something like cat service.yaml >> tmp.yaml && cat pod.yaml >> tmp.yaml. This can be used to check whether selector filters in a service and attributes in pods match.

Tip # 4: Skip the Course Purchase

That's right.

There are courses in platforms like Udemy that claim to prepare you for the CKAD exam. However, in my experience, these courses are of limited value for the exam.

Don't get me wrong; purchasing courses is a great way to learn. However, for the CKAD certification practical exercises are more valuable.

When you register for the CKAD exam through the Linux Foundation (opens in a new tab), you get access to an exam-like environment for free. This environment is available for limited time. In my case, I had access to two 36-hour sessions, which were enough for my learning requirements.

In addition to the virtual environments, you also get access to a demo exam. The questions are well-structured and closely resemble the difficulty level of the CKAD exam. If you run out of time in the test environments, you can practice the demo exam questions with a locally installed Kubernetes.

So, before you consider purchasing additional study resources, check if the demo exam and the free resources meet your learning needs.

You're all set

I hope these tips help you on your exam. Remember to share your achievement after completing the certification.

Best of luck!