This article is based on my experience studying for and passing the Certified Kubernetes Security Specialist exam. I recently cleared the CKS (Certified Kubernetes Security Specialist) exam with a decent score in my first attempt. So I thought I should share my story of the exam preparation along with the tips and tricks that helped me in clearing the exam. If you are also preparing for the CKS exam, then this article will help you get a good idea on what is the format of the exam, what resources to utilize, how to manage the time during the exam, how to prepare & some important tips related to the exam.
A note before we begin [A brief about Kubernetes]:
If you think getting a CK{A or AD or S} certification seems like a lot of work, you’re right. But that hard work is worth it for many. Since Kubernetes was open-sourced by Google in 2014, it has skyrocketed in popularity. Now a graduated project of the Cloud Native Computing Foundation (CNCF), Kubernetes dominates the market, with 78% of enterprises reporting that they use it to orchestrate containerised workloads and services in production.
With this level of adoption, organisations are eager and struggling to find skilled Kubernetes developers and administrators. A quick search on LinkedIn shows that there are around 50k (47,385) jobs with Kubernetes in the title or description.
Given that the demand is growing for Kubernetes knowledge and skills, getting certified as a Kubernetes specialist makes a lot of sense, and this is just one part of the story.
Kubernetes is the future of infrastructure and almost every company is adopting it nowadays or has plans to adopt it in the near future. This is one of the most sought after skills that customers need now. Almost every organisation is either converting their legacy applications into cloud-native apps or building new apps which are cloud-native.
I have divided the article into relevant sections. Some sections would help you with the preparation phase while some would help you in the actual exam hence feel free to skip any of the sections depending on the current preparation phase you are at.
CKS Pre-Requisites:
Certified Kubernetes Security Specialist (CKS) candidates must have taken and passed the Certified Kubernetes Administrator (CKA) exam prior to attempting the CKS exam.
Apart from this, there are no official prerequisites for this certification. However, before thinking of CKA or CKS, having knowledge of Kubernetes basics is crucial. If you’re a complete newbie and do not know what on earth is Kubernetes? It is highly recommended to get familiar with the basic concepts of Kubernetes before you book your exam dates.
Syllabus:
This is the curriculum for the exam:
The domain-wise syllabus can be seen in the above image, but figuring out which chapters do fall under which domain is a difficult part, thankfully Walid A. Shaari’s Github Repo has already a detailed curated list of the syllabus topics. The repo has all the useful links for the exam and it’s highly recommended to go through it at least once.
You can also check the complete topic wise syllabus at Leandro Martins’s Github Repository.
CKS Exam Format:
The exam is kind of “put your hands on”, where you have some problems to fix within 120 minutes.
This exam is a performance-based exam with no multiple-choice questions. You will be given a set of performance-based problems to be solved in a command line and is expected to take approximately two hours to complete.
The old platform relies on screen sharing in order for the proctor to see the candidate’s screen. This will no longer be the case for the new as they moved from the remote terminal to a complete remote desktop session. The reason behind the change as the Linux Foundation put it, is to improve further the security and privacy of the candidate (no longer screen sharing) and since the exam will take place from PSI’s secured browser, candidates can expect similar experiences who take the exam since everything is done in a single environment that works the same way for everyone.
My tip: Spend time wisely. Use the Notebook feature (provided in exam’s UI) to keep track of your progress, where you might take notes of each question, and put some annotations to help you.
Resources Allowed:
The CKS exam is an open-book exam. You have access to the resources:
CKS Important Resources
Currently, the Linux Foundation provides the CKS certification. Keep your eye out for promotions & discounts during the Cyber Monday or Black Friday sale. I would not recommend purchasing any training material on Linux Foundation. Just purchase only the certification. You can schedule the exam date within 1 year of the purchase date and it also includes one retake in case you don’t get through it the first time. It would also include 2 free exam simulator sessions on Killer.sh.
The following are a few awesome resources available on passing the CKS exam:
CKAD Exam Practice Lab Setups
Now after getting knowledge on all the topics expected in the exam curriculum, the next step should be to PRACTICE.
CKS Tips & Tricks
alias k=’kubectl’ : This will save you the time of pressing 7 keystrokes spent on each kubectl command. You only have to do this in Udemy labs. The actual exam will have this preconfigured.
The following kubectl configurations will save you a few seconds from each command execution, which will add up to several precious minutes. Do note that the exam interface will come with the alias k and bash auto-completion for kubectl preconfigured.
DO’s
DON’T’s
My Exam Experience
On the exam day, try to log in 30 minutes before the exam. Since the migration to the PSI bridge software, you can check in to the exam yourself 30 minutes before the exam start time. You need to download and install the PSI secure browser but the download button will only become active 30 minutes before the exam (you can’t download and install it a day or two in advance). So don’t wait until the last minute and be there 30 minutes early. Sometimes, you may face trouble while installing the software so make sure to read the installation guide relevant to your OS before the exam. Make sure you don’t have any other processes running during the exam.
Proctor will make sure to follow their process to check your ID proof, room and your desk. The entire process should normally take 25–30 minutes or more, but don’t panic as the proctor will only start the exam after all the verification process is complete and you’re comfortable to start the exam. The exam is easy to pass as long as you know your stuff and have practiced your stuff. Knowing Kubernetes is simply not enough unless you have practice because you will be fighting against time. On any other day, you can open your favourite text editor and write YAML and save them and apply them, at your own pace. But at the exam, that is not feasible. Always you must take the shortest path possible to achieve a result. I followed the 1 min-1 mark rule for managing time. In short, what the rule says is if a question has a weightage of 10 marks, then try not to spend more than 10 minutes on the same question.
As soon as the exam started, I first finished setting up the kubectl aliases by running the commands(kubectl auto-complete is pre-configured). One important thing which I followed throughout the exam was to take a backup of every resource in a separate YAML file, that you are either going to DELETE or UPDATE. Especially the KubeAPIServer, KubeScheduler, and ETCD YAML files as if any of the files is misconfigured, the cluster won’t function properly. Taking backup of one resource may take around 10–30 seconds but believe me if things go south, it can save a lot of time. While taking the backup into a YAML file, add the question number as the prefix of the name of the YAML.
Example: If you are asked to change the network-policy app-netpol in question number 8, then take the backup using a command kubectl get networkpolicy app-netpol -oyaml > 8_netpol.yaml. Trust me, this will help you audit the changes you did at the end of the exam or continue unfinished work in a flagged question.
A very important tip for the last, though this holds good for any certification exam but try to be on a fast, stable internet connection as you will be using a terminal running inside a GUI Linux virtual machine. The lesser the lag, the better the exam experience.
Finally, I would say be calm & enjoy problem-solving. Don’t get bummed out if you don’t get the desired result on your exam. You get one free retake per exam if you haven’t otherwise been deemed ineligible for certification or a retake.
Useful Bookmarks:
You can add or remove the items below list at your convenience, and yes give some good annotations for the bookmarks.
kubectl Cheat Sheet — https://kubernetes.io/docs/reference/kubectl/cheatsheet/
Kubectl Commands — https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands
Network Policies — https://kubernetes.io/docs/concepts/services-networking/network-policies/
Security Context — https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
Secrets — https://kubernetes.io/docs/concepts/configuration/secret/
RBAC — https://kubernetes.io/docs/reference/access-authn-authz/rbac/
Seccomp — https://kubernetes.io/docs/tutorials/clusters/seccomp/
Apparmor — https://kubernetes.io/docs/tutorials/clusters/apparmor/
ImageWebhookPolicy — https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/
Audit Policy — https://kubernetes.io/docs/tasks/debug-application-cluster/audit/
PodSecurityPolicy — https://kubernetes.io/docs/concepts/policy/pod-security-policy/
Kubelet Config — https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/
RuntimeClass — https://kubernetes.io/docs/concepts/containers/runtime-class/
Admission Controllers — https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#podsecuritypolicy
automountServiceAccountToken — https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
Pod Volumes — https://kubernetes.io/docs/concepts/storage/volumes/
PV PVC — https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/
Ingress — https://kubernetes.io/docs/concepts/services-networking/ingress/
Third-party links
I hope this article’s content helps you with your CKS certification journey. All the best for your exam. Happy Learning!
Congrats @surabhiisharma! Thanks for sharing your advice and best practices. I'm sure this will be helpful for others 😊
Thanks a lot, @surabhiisharma this is really helpful, great Job! Kudos to you.
Covered everything in Detail for the exam 👍
Fantastic article, very detailed and nicely written, would recommend this article to all aspirants for Kubernetes certifications. Great job👏👏👏🎉
Great writeup Surabhi! One stop shop for all CKS preparation queries.
is this helpfull?
Thank you for sharing your experience and the resources.
In addition to those you have highlighted, I have found the below resource useful that covers the solution walk-through and how to approach the CKS Killer shell exam simulation,
https://www.youtube.com/playlist?list=PLpbwBK0ptssx38770vYNwZEuCeGNw54CH
Congrats @surabhiisharma for the achievement. This is a great milestone in your professional carrier. Thanks for taking the time and sharing very much detailed preparation material and other tips and tricks. This will surely help Kubernetes and GCP enthusiast.
My 2c: to complete exam you need to practice a lot to type and memorize the flags of kube-apiserver. It is also necessary to confidently create roles, service accounts, secrets using kubectl.
If I could choose, I would prefer to take the GCP certification. You really gain more knowledge when you prepare for it. CKS was disappointing.
Regards,
Alex Romanenkov
User | Count |
---|---|
25 | |
14 | |
6 | |
2 | |
1 |