· Tutorial  · 5 min read

How to pass the CKAD, CKA & CKS exams

I just completed the CKAD, CKA & CKS exams in a month. Here is my tips & tricks to do the same 😌

I just completed the CKAD, CKA & CKS exams in a month. Here is my tips & tricks to do the same 😌

I successfully completed the Kubernetes exams in a bit more than a month 🥳

Here is the official badges issued by The Linux Foundation on Credly :

Learning Path

The CKAD, CKA & CKS are 2 hours hands on exams in a PSI Secure Browser. You have one year to pass the exam after the purchase. You can find easily a coupon code on the internet for some discount.

Courses

Here is the courses I recommend for the exams :

Killer.sh > 75

You will have 2 free sessions on killer.sh, which is quite similar to the PSI Secure Browser. Each one available for 36 hours, but both have the same questions. If you succeed to obtain a score of 75 or more, you should be fine at the exam.

PSI-like exam UI

Know how to verify

Be able to verify your answers is a really good exercise during the training phase. For instance, if they ask you to deny all traffic from a pod, you can check it using :

Terminal window
kubectl -n sandbox exec shell -- curl -s google.com

kubectl explain

At the exam, you will have access to the kubernetes official documentation, but if you need to search in it for every questions, you will lose too much time… So being familiar with the doc to quickly find a yaml sample for a PersistentVolume is nice, but for the rest, kubectl explain is your best tool !

Terminal window
# Get the documentation of the resource and its fields
kubectl explain pods
# Get the documentation of a specific field of a resource
kubectl explain pods.spec.containers
# Get all the fields in the resource
kubectl explain pods --recursive
# Browse the documentation
kubectl explain pods --recursive | less

kubectl run, create, edit, scale, expose

You can solve most of the questions without writing any yaml, if you know the tricks 😉 Worst scenario would be to type a command, dump the yaml into a file, then edit & apply. Here is some samples :

Terminal window
# Create a nignx pod ...
kubectl run nginx --image=nginx
# ... and dump it to a yaml file for some customization
kubectl run nginx --image=nginx --dry-run=client -o yaml > pod.yaml
# Create a deployment
kubectl create deployment nginx --image=nginx
# Scale it to 3 pods
kubectl scale --replicas=3 deployment/nginx
# Expose deployment
kubectl expose deployment nginx --port=80 --target-port=8000
# Change ClusterIp to NodePort with edit
kubectl edit svc nginx

Set context & namespace

Each question is bound to a particular context & namespace. Use kubectl config set-context ... at the beginning of each question to be sure where you are. They will provide the command, you just have to copy-paste it !

Flag & Skip

You must have 66% or above to obtain the certification. So it’s better to flag & skip a question, instead of losing 15 minutes on it ! You can go back on it later 😉 Normally, you will be able to answer to 75% questions in less than 5 minutes, so keep the 1 or 2 hard ones for the end…

Backup files

You should backup any file they provide, in case you want to restore it, like any seasoned Ops 🧙🏻‍♂️

Terminal window
cp /some-dir/file.yaml /some-dir/file.yaml.ori

Minikube or some VMs in the cloud

For CKAD, Minikube is your perfect training environment. On the other hand, I strongly recommand you to use some VMs on AWS, GCP or Azure for the CKA & CKS. Some people could argue that you can do it using Vagrant or Minikube, but it will add an unecessary level of abstraction…

Killer-sh provide a good k8s cluster setup example.

Vim tips

Vim will be your only editor available. So be comfortable to use it. There is a lot of Vim beginners guide on the internet if you need to.

One particular useful Vim trick for the exam is to visual select a yaml block and indent it. You can easily do it with :

  • shift + V to select some lines
  • > or < to indent them more or less
  • . to repeat

TL;DR

The kubernetes certifications doesn’t contain any big surprises if you have studied & trained enough. Don’t stress to much, and keep in mind you need to achieve 66% with one free retake 😉

Back to Blog

Related Posts

View All Posts »