Score Card

How I scored 99% in CKA first attempt[Not for beginners]

Sinha Software Solutions

--

Background

I have been working on Kubernetes for a long time now. It all started back in December 2017 when I was asked to deploy and test one of the services on Kubernetes. It was tough! Not because Kubernetes is tough but because I was a noob just out of college who thought writing java code is the coolest thing to do as engineer. That mindset changed in two years though.

I have worked on OpenEBS project in past which is Kubernetes native storage engine. I learnt a lot while developing features for the project. It involved not only Kubernetes API usage but also extensive use of the cli kubectl.

When I switched job I started working on a more challenging project which was on cloud migration(fun fact: as of today my employer is still hiring more engineers for that profile. Be sure to checkout my LinkedIn and connect if you want a referral). This made me understand the power and use case of Kubernetes not just with a Kubernetes Vendor’s perspective but also Kubernetes User’s perspective. I learnt a lot in this project and still learning. I spend a huge chunk of time in design discussion and debugging.

A number of my friends started taking CKA and they were pushing me to take it. It started with Ashutosh Kumar aka Baba clearing the exam and then recently Akash Srivastava aka Vladmir. Three weeks back I talked to Vladmir about preparing for exam. He convinced me that it will take some 6–7 days. To be on safer side I took 10 days and booked the slot. The results came out today and I cracked it with a score of 99%. So how did I do it?

Preparation Time

I purchased the official CNCF course few months back but was not going through it regularly. Occasionally I will open it up and go through lab exercises. The course is really great though. It has everything you need to know about running Kubernetes and managing it. The exercises are also very good. So I spent like a month or so in going through the course.

Marathon Preparation

I spent 9 days to prepare and here is how I spent the time:

Day 1–2: Cluster Setup using kubeadm and revising components of kubernetes

Day 3–4: Learning deployment objects like pod, deployment, daemonset etc.

Day 4–5: Deploying applications using above objects and in combination, utilising the features of these object.

Day 5–6: Services and other resources like secrets,volumes,resourcequota, limitranges etc.

Day 7–8: Close loop with all the knowledge accumulated so far. Use various objects in conjunction like Daemonset with taint toleration and rolling update etc.

Day 8–9: Revise everything again.

Day 10: Take exam.

I referred to the official CNCF course to decide the order of objects and concepts I should go through.

Preparation Resources

  1. Official CNCF course
  2. Kubernetes docs and api references: Must do the Tasks and Concepts section. You can skip some tasks like federation and some debugging sections (which I skipped too)
  3. Stackoverflow for QnA
  4. Slack #cka-exam-prep http://slack.k8s.io/ for more material
  5. Random blogs on Kubernetes

Exam Tips

Must learn hacks of kubectl

  1. kubectl explain
  2. kubectl — dry-run and other flags
  3. kubectl create/replace/update/delete/run etc

Use Kubernetes docs

  1. You are free to open any subdomains of https://kubernetes.io/docs/ and github kubernetes docs repo.
  2. Make use of the search bar in the docs site
  3. Download the YAMLs and edit them

Learn to use wget/curl

  1. The exam environment only allows you to copy 2 lines at a time
  2. Instead of typing the YAMLs you can open examples in the docs site and copy the url. Then use wget/curl to download the YAML.

Learn VIM shortcuts

I use vim to edit files quickly. Nano is another option but the shortcuts of vi are more rich. Copy/Paste/Delete/Multiple line selection and edit are the shortcuts that you should be aware of. It will save a lot of time.

Enable auto completion

Enable auto completion of all the clis that you would be using:

source <(kubectl completion bash)
source <(etcdctl completion bash)
source <(kubeadm completion bash)

This would help you in saving time and getting an insight of available flags. If you don’t do this then you will endup opening man page or help page of the clis.

Store your YAMLs

I found it very useful to store the YAMLs that I generated to solve problems. I marked them with question num like 1-pod.yaml, 6-deploy-svc-secret.yaml .The benefit of doing this was that you can reuse the yamls by copying them to new file and you can keep track of the progress you made. It is very helpful when you try to verify.

Use Notepad

The exam env comes with a notepad where you can take notes. I used it to keep track of problems that I skipped initially. I also stored some commands of creating secrets and exposing a deployment etc. in the notepad.

Do what you know first

The most advised strategy in any exam is not to get stuck in one question. Just skip it. There are 24 questions that are needed to be solved. First do what you are comfortable with. Just make a note of skipped question and revisit it later.

Conclusion

If you have been working on Kubernetes for long time then preparation could be done in 10 days. It is good to learn hacks like wget/vim shortcuts to save time.

If you like this blog then show your appreciation by clapping and sharing it. Feel free to post your questions here. You can also connect to me on LinkedIn (please mention through blog in the request).

CKA certificate

--

--