Pravar Agrawal Technology & Travel

My CKA Preparation

Recently I appeared for my CKA(Certified Kubernetes Administrator) certification, after a year of lingering over exam dates. And I’m glad that I cleared it in the first attempt. In this post, I’ll be sharing my experience starting from the exam format and preparation.

I bought the certificate exam around last year during Black Friday sale by CNCF and it cost me almost $160 for the whole bundle including exam and training course. And the purchase is valid for a year meaning, within a year from the date of purchase we can appear for the exam anytime and also with one free retake. The exam has a passing percentage of 74% and AFAIK, there is no evaluation on step marking or half answer to the question. The exam comprises of about 24 questions which we need to complete within the time-frame of 3 hours. All the questions are hands on so whoever is appearing for it, better to know quite a few kubectl commands by heart. Though, it’s a book exam so we can have access to whole time but still it’s good to know the commands. Luckily, since I’ve been working on Kubernets for more than a year now, I was pretty thorough with kubectl commands. This gave me an added advantage and I was pretty fast when it came to using shortcuts during exam. It was unfortunate that I lost almost 20 minutes out of designated 3 hours due to some setup issues but still I was able to finish my exams 10 minutes earlier.

Now onto my preparation. Since I bought the exam+training bundle, I had access to the Linux Foundation training courseware which comes along with it. I did get a review from few folks that it’s not that good and all, but since I was a beginner back then so it helped me at least to get started at some place. If nothing else, but I could get a direction in what to read about next from the contents listed in it. Apart from that Kubernetes official documentation helped me a lot. And yes, I’ve read the whole of it atleast once as part of my exam prep. It’s a very good read and a must if you are preparing for either CKA, CKAD or even planning to jump into the Kubernetes ecosystem. I’ll be posting few reference links which I’ve used for my preparation.

When it comes to preparing for exam, apart from going through the documentation there are few key points which one should keep in mind:

  • Hands on kubectl commands, like we discussed earlier
  • Basic knowledge of Linux commands, systemd, directing output of a command in a text file etc.
  • Creating Kubernetes resources using both command line as well as YAML
  • Basics of Networking

Let’s take a look at few example questions similar to the ones I got in the exam:

# create a deployment using nginx image and then scale
it to 6 replicas. Once the deployment is scaled, expose the deployment
as a service named nginx-service:

# Following command creates a deployment of nginx-deploy using
specified image version
$ kubectl run nginx-deploy --image=nginx:latest
deployment/nginx-deploy created

# Following command scales the recently created nginx-deploy to 6 replicas
$ kubectl scale --replicas=6
deploy/nginx-deploy deploy/nginx-deploy scaled

# Following command exposes nginx-deploy to a service at port 80
$ kubectl expose deployment nginx-deploy --name nginx-service --port=80

Similar to above mentioned commands we can check the logs of recently created pods using below command:

$ kubectl get pods
# will list the name of all the available pods in default namespace

$ kubectl logs pod_nginx_deploy -ndefault
# will display the logs of pod_nginx_deploy on stdout generated so far

$ kubectl logs pod_nginx_deploy -f
# The -f flag will follow the logs of mentioned pod

Below is the list of resources which helped me in my preparation:

Always feel free to reach out in case of any doubts, suggestions on: pravarag at gmail dot com . I like to talk about Kubernetes, Containers, Cloud Native applications :)