DEV Community

Cover image for Efficient tips to pass the CKAD exam
Jérôme Dx
Jérôme Dx

Posted on • Updated on

Efficient tips to pass the CKAD exam

CKAD (Certified Kubernetes Application Developer) is the certification delivered by the Linux Foundation, to validate developer skills on Kubernetes.

First, you can use Udemy course to go through the program you need to know, taking notes on things you want to review.
it's a good way to go through the whole program.
With Udemy, you have access to Kodekloud which is a simulator to practice alongside video lessons.

Practice is the key, you can setup a local Kubernetes cluster with Kind, and work on the CKAD exercises to assimilate all the concepts you need to learn.

Practice is the key

But you should know that this certification is essentially a test of speed and that it is absolutely necessary to train with a simulator close to the conditions of the exam, to not be surprised : Killer.sh (note that it's a little harder than the actual exam).

So you have the resources to be ready, now I will share some tips to gain precious seconds during the exam, because it will be very fast.

Tips to be efficient during the exam

Set shortcuts

Edit your ".bashrc" file with this values, learn them by heart, you will see in the next steps that they will be usefull :



# to speed up pods termination
export f='--force'

# to print values of resources
export dry='--dry-run=client'
export o='-oyaml'

# for context switching
alias kshow='kubectl config get-contexts'
alias kx='kubectl config use-context'
alias kn='kubectl config set-context --current --namespace'


Enter fullscreen mode Exit fullscreen mode

Context switching

With this simple commands you can navigate quickly between contexts and namespaces on Kubernetes (without any plugin required) :



# Show current context and namespace
kshow

# Select context "kind-kind1"
kx kind-kind1

# Select namespace "default"
kn default


Enter fullscreen mode Exit fullscreen mode

It is very important to know this commands, you will need them for each new exercise on the CKAD exam.
The first question to ask yourself, for each new exercise is : "Which context and which namespace ?".

Be very comfortable with Vim and Yaml manipulations

You will have to manipulate Yaml files pretty often.

For Vim, you have to handle copy/paste, and to switch between files : the :e myfile command being convenient, you will just have to switch between buffers.
Here is a Vim cheatsheet that can help you.

You will have between 16 and 19 questions, depending on the exam.
You can create a folder, and name your files like this : 01_pod.yaml (01 being the question number), in order to find the files of the previous questions when needed.

Handle your time

There is a flag system, if you are not sure, just flag the question and come back later.

You can do the things you know, even if it's incomplete. You will have a percentage of points based on each action you have done well.

Learn to generate the manifest files, from imperative commands

To create a resource, get the informations :



k create deploy --help


Enter fullscreen mode Exit fullscreen mode

Then, you can create the resource directly with imperative command :



k create deploy mydep --image=nginx --replicas=3


Enter fullscreen mode Exit fullscreen mode

Or create it with the generated manifest file, like this :



# Deployment example :
k create deploy mydep --image=nginx --replicas=3 $dry $o > 01_dep.yaml  # edit it
k apply -f 01_dep.yaml

# Cronjob example :
k create cronjob myjob --image=busybox --schedule="*/1 * * * *" $dry $o -- sh -c "date" > 01_cronjob.yaml  # edit it
k apply -f 01_cronjob.yaml


Enter fullscreen mode Exit fullscreen mode

Learn to search in the official documentation

During the exam, you will have access to the Kubernetes documention, learn to navigate in it, by knowing the good keywords (for instance, "cheatsheet", that might be helpful), and resources you can’t handle with k create, try to handle all the program with it.
Be careful, sometimes keywords are not obvious, for services, think to expose, for secrets, think to credentials, etc.

With explain you can have the complete list of parameters. If you need to find one, it can be complementary and easier to find than on the documentation :



k explain po.spec > po-spec
k explain po --recursive=true > po-full

k explain job.spec > job-spec
k explain job --recursive=true > job-full


Enter fullscreen mode Exit fullscreen mode

Learn to edit existing resources

Like this :



k edit deploy mydep


Enter fullscreen mode Exit fullscreen mode

Or by extracting the yaml output :



k get deploy mydep $o > 01_dep.yaml  # edit it
k apply -f 01_dep.yaml


Enter fullscreen mode Exit fullscreen mode

Be careful, it is not possible to edit specifications of pods directly, you have to destroy and create them again (except for some elements, like labels or annotations).

Learn to execute temporary pods to launch commands

Like this :



k run nginx --image=nginx:alpine --rm -it --restart=Never -- curl https://www.google.com


Enter fullscreen mode Exit fullscreen mode

Or (Busybox is faster) :



k run busybox --image=busybox --rm -it --restart=Never -- wget -qO- https://www.google.com


Enter fullscreen mode Exit fullscreen mode

You will have to use curl or wget to check if your services are well exposed, you have to be familiar with this.

Learn to find extra informations

Some commands will help you for that :



# Get extra informations, like exposed IPs for instance
k get po -o wide
k get node -o wide

# Get labels of pods
k get po --show-labels

Enter fullscreen mode Exit fullscreen mode




Accelerate the deletion of pods

You can gain some seconds by deleting a pod like that, to force deletion :



k delete mypod $f

Enter fullscreen mode Exit fullscreen mode




Learn the complementary tools

There are complementary tools that you must know for the certificate, like Helm and Docker (or Podman, you have the choice, it's pretty much the same commands than Docker).
Also take the time to get comfortable with them.

The Helm documentation, with a convenient cheatsheet is allowed during the exam.

Now, good luck !

At this stage, you have good tips to go fast at this test, ensure you are comfortable with all the notions of the program and it should be fine.

Remember, practice, practice, practice, for this exam, this is the key.

Top comments (3)

Collapse
 
serlan3 profile image
Serlan hyman

Thank you for sharing your exam experience. I took the exam last week and finally certified and would highly recommend using Skillcertpro's practice tests skillcertpro.com/product/certified... They were nearly identical to the tasks given in exam and I found that about 80% of the questions on the main exam were covered in these practice tests. Best of luck to everyone!

Some comments may only be visible to logged-in visitors. Sign in to view all comments.