How I passed the CKA (Certified Kubernetes Administrator) Exam

Hello,
I have just become a CKA Administrator and this is my story.

It took me 2 months of preparation starting from zero to hero.
During that time I as was learning for around 3 ~ 5 hours almost everyday.

To learn k8s I have:
1) done “Certified Kubernetes Administrator (CKA)” course on Linux Academy twice. 
2) setup k8s cluster 3 times based upon “Kubernetes the Hard Way” course on Linux Academy.
3) read really carefully “Kubernetes in Action” skipping just a few chapters totally unrelated to the exam.
4) copy/paste and run all yaml files from https://kubernetes.io/docs/tasks/
5) done all tasks from https://github.com/arush-sal/cka-practice-environment.
6) done all tasks from https://docs.google.com/document/d/1o4qE9x4oXcqFgquUE1yYGJKhNmZnaeMR5SyxwjGGl1w/edit
7) read all conversation on https://kubernauts.slack.com/messages from December till 23.02.2019
8) checked all points from https://github.com/walidshaari/Kubernetes-Certified-Administrator.
9) read all blogs related to “How I passed CKA exam” that I have found on the internet.
10) Before I attempt to pass the exam I knew how to create each resource using kubectl or where to look for the manifest in the official documentation.
11) Practice, practice, practice. Reading alone will not be enough.


Very first thing I have done at the exam was setting up my .bashrc

source <(kubectl completion bash)
complete -F __start_kubectl k

alias k=”kubectl”
alias kgd=”k get deploy”
alias kgp=”k get pods”
alias kgn=”k get nodes”
alias kgs=”k get svc” 
alias kge=”k get events — sort-by=’.metadata.creationTimestamp’ |tail -8"

export nks=”-n kube-system” 
export ETCDCTL_API=3
export k8s=”https://k8s.io/examples"

function vaml()
{
 vim -R -c ‘set syntax=yaml’ -; 
}

Examples of use:
kgp $nks
kgp busybox -o yaml | vaml
k apply -f $k8/pods/storage/pv-volume.yaml — dry-run -o yaml


General info:

I have become very comfortable with bash, vim, cfssl, systemctl, journalctl and tmux. 
And while I did not used tmux during the exam itself, I have found it to be really useful during learning process.

Example:
During my work with yaml files I have split my screen in tmux into 3 parts:

  1. split screen horizontally
  2. go to the bottom screen and split it vertically
My tmux setup

I was using top screen for the work with yaml files and kubectl.

Left bottom screen was running: 
watch kubectl get pods

Right bottom screen was running: 
watch “kubectl get events — sort-by=’.metadataCreationstamp’ | tail -6”

Which such setup it was easy to observe in real time how my pods are being created.
I also had view to the events related to my deployments.


With such preparations, I managed to answer 22 out of 24 questions in 2h:15m.
Good luck on your exam :)

ps) You may want to take a look at this repo:
https://github.com/ramitsurana/awesome-kubernetes