01
Jun 2020
CKAD / CKA exam tactics
Tags |
On Computer Technology
The CKAD (Certified Kubernetes Application Developer) and CKA (Certified Kubernetes Administrator) certifications probably need no introduction to anyone who is a k8s user.
In mid May 2020, I obtained both certifications and wish to share some pointers with you.
Unlike many other resources similar to this post that cover the curriculum, this blog post takes a slight twist in emphasizing some concrete non k8s related preparation work I did upfront to sharpen my edge for the exam, as well as concrete exam tactics I used during the exam.
There are some rules enforced by CNCF and must be strictly adhered to during the exam. These are the ones I find very important:
Once the exam starts:
In addition to the required k8s knowledge, you should have a good grasp of the following before you attempt the exam:
The exam requires you to use the Chrome web browser and the terminal exposed to you is that of a Linux machine. As such, you have to know the above to pass the exam.
These are what I did and recommend candidates to do:
CMD-c
and CMD-v
)vimrc
if using vim. More on that later.kubectl
commands so you save on typing during the exam. More on that later.If you are a heavy vim user (like myself) and/or will be using vim during the exam, I highly recommend you to memorize a bare bones vimrc and input it during the start of the exam so you get some good defaults. I used the following for the exam:
set nocompatible
set et
set number
set ai
set ts=2
set sw=2
set sts=2
set bs=2
bash aliases for commonly used kubectl
commands will save you a ton of typing (and time). I used the following for the exam:
alias v=vim
alias k=kubectl
alias kg='k get'
alias kdes='k describe'
alias kd='k delete'
alias kdf='kd -f'
alias kaf='k apply -f'
alias kx='k explain'
alias kcc='k config current-context'
alias kn='k config set-context $(kcc) --namespace'
alias knd='kn default'
alias knks='kn kube-system'
alias kcu='k config use-context'
alias kl='k logs'
alias klf='kl -f'
You should come up with your own list.
During the exam, you can append this line to ~/.bashrc
to source for the aliases:
[ -f ~/aliases ] && source ~/aliases
Please have a good rest. If you have done your preparation work, you should have no problem passing the exam. For CKAD, you should be aiming for a perfect score. For CKA, the content is slightly harder but you should be aiming for a very high score.
Access the exam site 15 minutes prior to the scheduled time. You should do so by logging onto the Linux Foundation Portal. There will be a link to redirect you to the examslocal.com site.
The proctor will come in, do the ID check and lay down ground rules before releasing exam to you.
Once the exam was released to me, I did the following:
vim ~/.vimrc
, entered the vimrc contents above, saved and quit.vim ~/aliases
, entered the bash aliases, modified ~/.bashrc
to source those aliases.k run nginx --restart=Never --image nginx --dry-run -o yaml >podspec.yml
k create deployment nginx --image nginx --dry-run -o yaml >deployspec.yml
The generic PodSpec and Deployment Spec come in handy when new Pods / Deployments need to be created but their complexity overwhelms the kubectl run
or kubectl create
command line. Simply make a new copy, make required modifications on that copy, then kubectl apply -f
.
kubectl
command supplied by the question to change to the correct context. Otherwise you would have done your work for nothing.default
namespace.
namespace
in the metadata
section.knd
will do the job.I have read some posts that suggest the web interface is crappy. My personal experience is otherwise; I find it pretty decent.
In terms of layout, there is a control section at the top of the page. The questions are on the left hand side of the page. The terminal is on the right hand side of the page and takes up the majority of the space.
From what I can remember, there are buttons / dropdown menus to:
The most important thing about this section is that important information such as namespace, Pod names, Deployment names and the like can all be copied. Hence you should not be making any typos.
There is a button at the end of every question to flag it. A dropdown menu is available to quickly navigate through questions. Questions that are flagged will have a blue flag appear next to them for quick identification.
There are 2 parts to this that can be toggled via “tabs”. The first is a help page that shows a set of instructions available using the man lf_exam
command. The next is the terminal itself.
Because there is only 1 terminal, if you foresee yourself requiring multiple terminals, use a terminal multiplexer such as screen or tmux.
This happened to me during my CKAD exam. About an hour into the exam, I lost my connection to the exam. My Internet connection was alright but somehow the exam website said I lost my connection to the exam and showed instructions to either call the support number or email the given support email address. None of that worked for me.
If this happens to you, please do not panic. When I took the CKA exam, I asked my proctor about this and what he / she suggested was to just wait because it is most likely an issue on the proctor’s end. The timer will be paused until you can resume the exam.
Disclaimer: Opinions expressed on this blog are solely my own and do not express the views or opinions of my employer(s), past or present.