Earlier last year I set out with a goal to give the Certified Kubernetes Administrator (CKA) exam a shot and I’m happy to say that I squeezed in a passing mark on it this past December! There is a lot of these exam experience-type posts out there – and they all seem to have a golden nugget hidden in each of them – for what it’s worth, here’s mine!
First up, let me say that I went into my studying with zero to little K8s experience – I don’t have a day job that requires me to use it on a regular basis and aside from messing around with minikube about 6 months ago, I’ve never really been hands-on at all with it. That said, I’d say I’m fairly competent when it comes to managing Linux environments – This is something that has always been part of my role throughout my career. I studied for probably 3 months or so, but not really focused up until the last 4 weeks – so here is my first study tip!
You need to be hands on!
Honestly, you will probably not just pass, but not even finish this exam without having hands-on experience with K8s. The exam itself is 2 hours, with 17 questions to complete – that leaves you roughly 7 minutes per question – now for some of the questions (mostly the lowest weighted) this is more than enough time – for others, especially if you need to hit up the documentation, you will most likely spend more than 7 minutes. In order to keep your exam flowing, it’s best to have solid hands-on experience so you don’t have to jump through tabs to look at the docs, or spend time looking at help files for kubectl. Knowing the flags and options for the most common parameters for create/apply/run/etc on the most common objects (pods/replicasets/services/etc) will be hugely beneficial in saving you time! I took a couple of different approaches to this – first, I created, modified, and destroyed my own K8s cluster multiple times, messing around with some sample applications like the Online Boutique. This helped, especially with some of the requirements around cluster creation and instantiation. That said, I think going through all of the sample quizzes and exams on Mumshad Mannambeth’s Udemy course was the deal-breaker! There is a lot of different questions and practice scenarios here – purchase this! The course itself is super cheap and gives you unlimited access to the labs – this I think, was probably what helped me most when it came to learning how the commands are all put together.
On the same note, skip questions that you aren’t sure of and move on – you can always come back to these and attack them later. One question doesn’t rely on another being properly answered so feel free to move back and forth as much as you want. Don’t spend 20 minutes reading through documentation trying to figure out the answer to a question – flag it, move on, and use your leftover time to do all that digging!
Use imperative commands as much as possible
Everything links back to time management with this exam so don’t spend a lot of time creating yaml files. If you can accomplish the task with an imperative command, something like kubectl run nginx –image=nginx:latest, do it. This will definitely save you time when having to troubleshoot spaces and incorrect yaml syntax.
-o yaml –dry-run is your friend
For those questions where you actually need to create a YAML file – say you need to specify securityContext or something within a pod – basically, something that isn’t supported as an option inside the imperative command – go ahead and still create the initial YAML file with the imperative command by appending -o YAML –dry-run to the command. This will at least give you the basic structure of the syntax and provide a good jumping point to start off with! On that same note, get used to what fields you can delete from the spec when you generate YAML files of existing objects – IE, ManagedFields and what not…
Don’t bother memorizing yaml syntax
If you already have memorized all of the syntax and options for each of the resources within YAML – well then, good for you – but if you haven’t, don’t sweat it! As you probably already know, the test is essentially an open book – you have access to the kubernetes.io documentation, which has a slew of examples when it comes to creating those YAML files.
Get familiar with kubernetes.io
With all that said, just because you have access to the Kubernetes docs doesn’t mean that things will be easy. Certainly take some time to get to know the structure of the site, where things are located. I spent the day before my exam bookmarking a bunch of documentation from kubernetes.io – focussing on those things that I knew I wasn’t strong with – this gave me a quick way to get to the proper spots within the documentation during the exam and didn’t leave me searching and browsing through unrelated articles/documentation. I had bookmarks with titles such as Pod YAML, Ingress YAML, PersistentVolume YAML, etc. This allowed me to quickly go to the proper pages – remember, you are only allowed certain subdomains of kubernetes.io. For instance, discuss.kubernetes.io is not allowed and it will show up in the search results, so you are best to get some bookmarks prepared.
So, hopefully, these tips will help someone as they embark upon their own CKA certification. While you don’t have to be a Kubernetes administrator to pass, you do need to be very comfortable performing admin tasks on a K8s cluster – which will only come with practice – so spin up those nodes and start deploying and destroying pods! Thanks for reading!