How to pass Certified Kubernetes Administrator (CKA) examination
Introduction
Certified Kubernetes Architect examination is one of the certifications offered by Linux Foundation. This certification is for Kubernetes administrators, cloud administrators and other IT professionals who manage Kubernetes instances. CKA was created by The Linux Foundation and the Cloud Native Computing Foundation (CNCF) as a part of their ongoing effort to help develop the Kubernetes ecosystem. The exam is an online, proctored, performance-based test that requires solving multiple tasks from a command line running Kubernetes.
What the examination validates
A certified K8s administrator has demonstrated the ability to do basic installation as well as configuring and managing production-grade Kubernetes clusters. They will have an understanding of key concepts such as Kubernetes networking, storage, security, maintenance, logging and monitoring, application lifecycle, troubleshooting, API object primitives and the ability to establish basic use-cases for end users.
My Background
I am a Cloud Native practitioner and I am working on the field of Cloud, DevOps, Containerization since last 5 years. I have completed my CKAD certification in 2020 and was focusing on clearing the CKA examination. I work with different Kubernetes installations like Amazon AWS EKS, Minikube and bare metal Kubernetes installations daily. I have also installed, provisioned these set ups many times. So I have a good and fairly long background with Kubernetes to sit in the examination.
Materials I have Used for Preparation
The first training I have used is Mumshad’s Certified Kubernetes Administrator (CKA) with Practice Tests from Udemy. It is pretty cheap if you buy it during sale. I bought it in INR 450. It covers all the required curriculum for the CKA examination. It has lot of useful lab practices which makes you better.
The second training I have used is Kubernetes Administration from Plural Sight by Anthony Nocentino. It also covers all the curriculum of CKA. The explanations are very nice and clear.
I have frequently used Kubernetes Documentation for reference. The documentation pages contain lot of examples, explanations and tutorials for everything in Kubernetes. You could get your doubts cleared for creating different Kubernetes Objects, Installing and Administering a cluster and many more.
How to start for the Examination
Learn
First finish the trainings you have enrolled for. Make notes for topics and understand how the different infrastructure in Kubernetes works. Understand all tools used like Kubeadm, Kubelet, Kubectl, Container Runtime, DNS and Network CNI Plugin. Understand how certificates work.
Practice
Practice all you learnt. Set up a minikube installation for practice regularly. You could also use Katakoda and Kubernetes Play Ground to practice. Kubernetes playground allows you to set up a multi node Kubernetes cluster and work on it for 4 hours in each session. Both of these are pretty easy to procure and use. The Kubernetes Playground site remains down sometime.
You can also set up your own multi node Kubernetes Cluster by following my article here. You need at least 8 GB spare RAM and around 40 GB extra hard disk for the same.
Practice Mumshad’s all labs at least 4 times. Practice the Lightning, Mock, troubleshooting labs at least 10 times.
Apart from that learn and practice how to use the Unix commands like grep, ip, openssl, journalctl, systemctl, ps, find, ssh and netstat. Learn what options these commands provide and how to use them.
Master the kubectl tool. Go though the commands and options combinations here. Try to practice each of them daily during your preparation period. All most all of the commands are necessary and may be used during the examination.
Shortcuts
I have used few kubectl short hands during the examination. You may refer them here. During your practice sessions you can use them daily so that you can memorize them well.
YAML Structure
Try to remember the Yaml structures of the Kubernetes Objects you can’t create by imperative command. Frequently use “kubectl explain” to know the structure, compulsory attributes and the value they accept.
Killer.sh
Killer.sh is an online examination simulator provided by Linux Foundation. There would be two CKA sessions which comes free when you will purchase your exam voucher. The sessions are identical in all aspects. Each session will be available for 36 hours. There would be 25 questions to be completed in 2 hours time covering the CKA curriculum. There are few extra questions as well. These simulations are more tough than the actual examination. I advise you to work on these during the last phase of your preparation when you will have enough confidence about you skill. You will get a good feeling about what the actual test would be.
The Examination
The examination would be of 2 hours duration delivered online. It will be entirely proctored. You have to answer 17 questions of different weights starting from 4 to 13 weights. You can take a break during the examination, but the clock would be keep on ticking. Copy and Paste options would be available. You need to answer your questions in 8 different clusters. All applications on your desktop must be closed. Chrome is the best browser to use for the examination. I tried using firefox and Chromium, but with those my screen did not get shared with the proctor. Apart from the examination browser tab, you can open another tab to browse where you could access only the below three websites.
Things to Remember
- Create a troubleshooting guide like this. This will help.
- Which config, yaml, executable is located where and how to find it.
- How to install and start a Kubernetes cluster
- How to back up and restore ETCD cluster
- How to create Jobs, CronJobs, Pod, Deployment, Daemonsets, StatefulSets, ReplicaSet and Static Pods
- VI editor commands
- How to create Roles, RoleBindings, Cluster Roles and Cluster Role Binding
- How to troubleshoot controlplane and worker nodes
- How to upgrade the cluster using kubeadm, kubelet, kubectl upgrade in controlplane and worker nodes
- How to create secrets, config maps, how to inject them in Pods as environment variables and volumes.
- How to pull container image from private registry
- How to schedule Pods on nodes using nodeSelector, Node Name, Node Affinity and custom schedulers
- How to use Jsonpath queries, create custom columns and sort by
- How to use Volumes, Persistent Volumes, Persistent Volume Claims, Storage classes and how to consume them
- How to create and use NetworkPolicy using Ingress and Egress with different combinations and constraints
- How to create an Ingress Resource to control routing of traffic to a Pod
- How to scale, change image in any workload and how to record it using rollout
- How to assign resource constraints in Container and Namespaces using Resource Constraints and Resource Quota
- How to identify and troubleshoot Cluster component and application failures.
During the Examination
Stay calm and have patience during the examination. You have two answer 17 questions in 120 minutes. So on each question you may spend 7 minutes roughly. Few questions may take lesser than 7 minutes and few may take more than 7 minutes based on your capability.
- Read the question properly and try to understand what it wants you to produce when you finished answering it. One question may have multiple tasks to complete. So ensure that all tasks are completed correctly.
- Try to create objects in imperative way as much as possible and edit them if necessary using dry-run. Keep using the short hands I have mentioned. It will save time.
- If an object can’t be created in imperative way try to copy it from the example given in Kubernetes documentation and edit for required changes instead of completely writing yourself. It will save a lot of time.
- While answering a question first change to the appropriate Kubernetes context as mentioned on top of the question.
- A can access to a notepad during the examination. In notepad keep track of your progress using the following table.
Q W A S Total = 4 + 4 = 8
1 4 Y Y
2 7 N
3 4 Y Y
Here Q = Question Number, W = Weight , A= Answered or Not, S = Satisfied . Total will be sum of weight of all questions marked satisfied. If you are not satisfied with a question you can flag it in the browser and set the A column to N for the question so than you can attempt it later.
- Try to attempt the questions you are confident enough and mark them Satisfied. Skip the questions you are not confident on, flag them and attempt them later.
- Don’t panic.
After the examination
After the examination be relaxed. The grade would be sent to you within 24 hours. If you are passed we will get a certificate like below which you can flaunt in you CV and linkedin profile. If you have plunked you are eligible for one free retake. Wishing you best of luck in your CKA Journey !!!