Tips to pass the CNCF Certified Kubernetes Application Developer (CKAD) exam
Tags: kubernetes, ckad, ckadtips, certification
Published: 2020-07-30 06:00:51

## **Short Intro …**

The Certified Kubernetes Application Developer (CKAD) program has been developed by the Cloud Native Computing Foundation (CNCF), in collaboration with The Linux Foundation, to help expand the Kubernetes ecosystem through standardized training and certification.

The exam is proctored online. It is a performance-based test which consists of a set of performance-based items (19 problems) to be solved in a command line within two (2) hours.

The cost is $US 300 and includes one free retake. This exam curriculum includes these general domains and their weights on the exam are:

* 13% — **Core Concepts** (pods, resources, quotas, kubectl — run, get, delete, create etc.)
* 18% — **Configuration** (ConfigMaps, Secrets, ServiceAccounts, SecurityContexts)
* 10% — **Multi-Container Pods** (SideCars, Ambassadors, Adapters)
* 18% — **Observability** (Logging, Monitoring, Debugging, Events, Probes)
* 20% — **Pod Design** (Deployments, ReplicaSets, Jobs, CronJobs, Update & Rollback Strategies, Taints, Tolerations, Affinity)
* 13% — **Services & Networking** (Services — ClusterIP, NodePort — Ingress Resources, Network Policies — Ingress, Egress)
* 8% — **State Persistence** (Volumes, Mounts, PersistenceVolumes, PersistenceVolumeClaims)

You can learn more about this certification at the official page of CNCF at [CKAD at cncf.io](https://www.cncf.io/certification/ckad/)


## How to practice/prepare for the exam ##

There are a lot of resources out there that you can use to prepare and practice for the CKAD exam and the best I can recommend are listed below:

1. **Official Kubernetes Documentation** (*https://kubernetes.io/docs/home/*) — familiarise yourself with this page, know how to navigate between the tasks and the concepts and master the sidebar menu as this will be the only page you can reference during the exam.
Use *https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands* on the page to master kubectl commands

2. **Courses — Udemy, edX, Udacity, KodeKloud**
You can master Kubernetes by subscribing to video courses especially that of Mumshad Mannambeth at KodeKloud (*https://kodekloud.com/courses*). Here you can learn and practice Kubernetes with hands-on questions that include Mocks, Projects, Labs etc. Also, you can register for the free edX course by the Linux Foundation at *https://www.edx.org/course/introduction-to-kubernetes*

3. **Books** — Kubernetes: Up and Running, Kubernetes in Action, The Kubernetes Book. These are some of the books you can lay your hands on to master Kubernetes.

4. **Unofficial Kubernetes** — *https://unofficial-kubernetes.readthedocs.io/*
I really love this page. It explains so many concepts of Kubernetes. You can delve into it as well. (Note: It is unofficial page)

5. **Kubernetes Cheat Sheet** — [Cheat Sheet](https://linuxacademy.com/site-content/uploads/2019/04/Kubernetes-Cheat-Sheet_07182019.pdf)
Please download and print out this two pages sheet. Paste it on your wall to quickly make reference to it.

6. **Short Tutorials and Tips**
Once you have mastered K8s and you are prepared to take the exam, you can practice some tutorials and write-ups from these pages:
a. *https://github.com/dgkanatsios/CKAD-exercises*
b. *https://github.com/twajr/ckad-prep-notes*
c. *https://www.reddit.com/r/kubernetes/comments/9uydc1/passed_the_ckad_special_thanks_to_the_linux/*
d. *https://medium.com/devopslinks/my-story-towards-cka-ckad-and-some-tips-daf495e711a9*
e. *https://medium.com/chotot-techblog/tips-tricks-to-pass-certified-kubernetes-application-developer-ckad-exam-67c9e1b32e6e*
**fluentd** — Practice this task and master it
*https://kubernetes.io/docs/concepts/cluster-administration/logging/#sidecar-container-with-a-logging-agent*


##Tips & tricks during the exam##

The duration of the exam is 120 minutes with 19 problems to tackle, approximately 6.3 minutes/problem. The following tips will help you to take good advantage of the time during the exam:

1. Don’t spend too much time on one question. **Skip the questions with weight 2%-3% if it takes a long time**. Note it on the provided notepad and reattempt them when you have time.

2. **IMPORTANT**: Always copy and run the *context* command provided at the top of each question. **Before you attempt any question, use your mouse to copy the command provided at the top of the question and run it on the console in order to be on the right context**. Although most questions will have the same context, some need to be done in another context; in order to be safe, run the command at the top of a question before attempting the question.

3. **Shorthands** — Use shorthand for some applicable resources.

```bash
#To get all the kubernetes resources shorthands, run
$ kubectl api-resources

#Then use shorthand to create those resources
$ kubectl create deploy nginx --image nginx #Deployments
$ kubectl create cm app-config --from-literal var2=val2 

#ConfigMaps
$ kubectl get sa #ServiceAccounts
$ kubectl get rs #ReplicaSets
```

4. **ALIASES are Time Savers**

Use an alias for some common command at the start of the exam before you begin providing solutions to the questions. The following 6 commands will help you to save almost 10 minutes (Save more in conjunction with shorthand):

```bash
$ alias k='kubectl'
$ alias kg='kubectl get'
$ alias kd='kubectl delete'
$ alias kr='kubectl run'
$ alias kc='kubectl create'
$ alias kcf='kubectl create -f'

#Examples of using them in your exam.
#Create resources from a YAML file
$ kcf pod.yaml

#Get pods resources
$ kg po
$ kg deploy
$ kg rs

#Create resources
$ kc cm pod-config --from-literal var4=val4
$ kc deploy busybox --image busybox -it -- /bin/sh -c 'echo Hello'
```

5. Create a resource file from kubectl command using the dry-run and -o yaml instead of writing the complete spec for the file.

```bash
#Create a resource YAML file
$ kr nginx --image nginx -oyaml --dry-run=client -- env > pod1.yaml
$ vi pod1.yaml #To edit the file
$ kc deploy nginx --image nginx -oyaml --dry-run=client > nginx.yaml
$ vi nginx.yaml #To add some contents like replicas etc
```

6. **NAMESPACES** — Take notice of any namespace mentioned in any question. If no namespace is provided, it is assumed to work in the default namespace.

If you encounter any question with namespace, read it till the end to know if the namespace has been created for you, if not, then you have to create it.

You might be asked to identify a particular resource that has an issue, it is important to know that the resource might belong to another namespace. So use get all with all namespaces to find out.

```bash
#Get namespaces
$ kg ns

#Create a namespace
$ kc ns dev-space

#Get all the resources in all the namespaces
$ k get po -A  #kubectl get pods --all-namespaces

#Create a pod in dev-space namespace
#Check if the namespace exists by using 'kg ns', if not, create it
$ kr nginx --image nginx --labels app=backend -n dev-space

#Get pods in a particular namespace
$ kg po -n dev-space
```

These are the tips for you to ace the K8s CKAD exam. Practice using the tips provided above and if it comes out otherwise, you can attempt it a second time for free.

I wish you good luck with your exam.