How I passed my CKAD with 97%
In August 2019, I have undergone the Certified Kubernetes Application Developer (CKAD) examination. I have scored an astonishing 97%! As a cloud platform engineer at Condé Nast International, interaction with Kubernetes clusters is continuous. However, for the CKAD assessment, I focused on efficient exercise solving under time pressure. Consequently, in this blog post, I would like to share some of the resources I used in preparation for the certification.
The Theoretical
CKAD is one of the 2 programs designed by CNCF to certify users that can “design, build, configure, and expose cloud native applications for Kubernetes”.
If you are a developer interacting with Kubernetes centric infrastructure daily, CKAD is a great method to benchmark one's skills against the latest industry standards. Similarly, CKAD is a great milestone for users that aim for a Certified Kubernetes Administrator (CKA) assessment.
The Practical
CKAD is a 2 hours exam targeting 19 practical exercises. It is paramount to be “fluent” in kubectl
commands for this assessment.
Solving a challenge and knowing how to verify a solution is critical.
Here are some tips for using kubectl
commands:
- use short names of the resources (e.g pods -> po, deployment -> deploy, networkpolicies -> netpol etc). To get a full list of short names, use the following command:
kubectl api-resourcesNAME SHORTNAMES NAMESPACED KIND
bindings true Binding
componentstatuses cs false ComponentStatus
configmaps cm true ConfigMap
endpoints ep true Endpoints
events ev true Event
limitranges limits true LimitRange
namespaces ns false Namespace
nodes no false Node
persistentvolumeclaims pvc true PersistentVolumeClaim
persistentvolumes pv false PersistentVolume
pods po true Pod
- use autocompletion (where possible) for resource-specific attributes. It is surprising how many attributes can be specified at the command-line level. For example, creating a pod with resource requests of 0.5 vCPU and 128Mi, a label of foo: bar and linked to the service account named test-sa, can be done by using the following command:
kubectl run pod --image=nginx --restart=Never \ --requests=cpu=0.5,memory=128Mi \
--labels=foo=bar \
--serviceaccount=test-sa
A full list of available flags can be found out by using autocompletion (e.g. double-tab). To enable autocompletion, use this official guide.
- use
--dry-run
and-o yaml
flags. These flags are incredibly useful to verify any configuration by outputting it to the standard output. Also, these are practical to redirect the yaml configuration to a file by using>
sign (e.g.kubectl run nginx --image=nginx --dry-run -o yaml > nginx.yaml
) - use
kubectl run --help
. This command is a great helper to get efficient commands for resources creation:
kubectl run --helpExamples:
# Start a single instance of nginx.
kubectl run nginx --image=nginx
# Start a single instance of hazelcast and let the container expose port 5701 .
kubectl run hazelcast --image=hazelcast --port=5701
# Start a single instance of hazelcast and set environment variables "DNS_DOMAIN=cluster" and "POD_NAMESPACE=default"
in the container.
kubectl run hazelcast --image=hazelcast --env="DNS_DOMAIN=cluster" --env="POD_NAMESPACE=default"[...]
- use
kubectl explain [[resource.attribute]]
. This command is handy to see the attributes nesting and their type.
Once confident with the kubectl
commands, the next stage is to train the aptitude of solving CKAD exercises under time pressure. There are a handful of resources available. Here is a list of resources I used during practice:
- CKAD exercises: https://github.com/dgkanatsios/CKAD-exercises
- CKAD Udemy course (concepts + exercises): https://www.udemy.com/course/certified-kubernetes-application-developer/
- Practice Kubernetes tasks for all CKAD concepts
- Kubernetes App Development (book and exercises): https://matthewpalmer.net/kubernetes-app-developer/
The Result
Overall, passing the CKAD examination was an extremely fulfilling experience! In my case, the above resources represented the golden path towards an overall high score. I am hopeful that these resources can be helpful to all Kubernetes sailing users aiming for a CKAD!
Good luck with your CKAD exam!