Skip to content

In my previous article, I wrote about Kubernetes certifications and my impressions of them. This time, I’m going to share 10 helpful tips for those who are considering taking any or all of the exams.

So let’s cut to the chase.

1. Use techniques to speed up the work

It’s number one for obvious reasons. It’s fundamental to be as fast as possible during the exam, as the exam’s tasks test your actual skills, not your knowledge of Kubernetes. The latter is a requirement, but not sufficient to pass.
Trust me, you can be Kubernetes guru, but if you haven’t practiced enough or you’re just too slow you may fail.

So here’s the most important things I encourage you to learn and use during the exam:

  • Kubectl autocompletion – I’ve been using it for many years now and I just can’t imagine working with any Kubernetes cluster without this feature. Of course, I wish there were k9s available during the exam, but autocompletion can still save you some precious time.
  • Kubectl create – In many cases creating an object from scratch is just far easier and faster with kubectl and its vast (but not all) resources you can create. And even if it’s not flexible enough, you can always use it to quickly create a skeleton for your object (use the dry run flags with the yaml output: ‘--dry-run -o yaml’). I especially like to create RBAC roles and bindings, because all the options are there without having to write a single line of yaml.
  • Use different methods for getting information about the resources – What I mean by that is that you learn to retrieve and filter data from the Kubernetes API. You need to know how to efficiently filter the stream of enormous information about a set of objects.
    So your job is to know the yaml output (-o yaml) and how to find the requested data by using grep or dedicated tools such as yq. Sometimes json is the way to go with the jq command for filtering or the ‘jsonpath’ output with its builtin filtering mechanism.
    I also find the  ‘custom-columns’ output option to be particularly handy and fast in some cases.
  • Bash shortcuts – Another way to increase your speed is by leveraging Bash’s readline library integration. This allows you to significantly shorten the time you spend on typing the commands, searching them from history and modifying them. Here’s my favorite and yet not so obvious shortcuts:
    • Search history incrementally (ctrl+r)
    • Move between words (alt+arrows)
    • Delete words (alt+backspace)
    • Delete whole parts of line (ctrl+k, ctrl+u)
  • Edit in place – I know that for some of us GitOps is the only way to apply changes in the cluster, but in the exam you do it manually and instead of changing the manifest it’s faster to just ‘kubectl edit’ it. And yes – vim is your best friend here.

2. Use labs

When you buy a Kubernetes exam, you are entitled to use a lab provided for free that you can use to practice your exam. Don’t skip it for at least two reasons.

First, it shows you the environment you will use during the exam. You cannot use your tools on your laptop – you’re provided with a set of tools within a controlled environment.
What made it less convenient and something I had to get used to were the keyboard shortcuts. Learn how to copy and paste, because you’re going to use it a lot and you better do it as fast as possible. The same applies to searching through the documentation – it’s the most valuable resource available during the exam and as long as you haven’t memorized all the options, you’re going to copy&paste it a lot.

Second is of course the tasks. They are supposed to be harder than the real tasks on the exam and it’s true for all of them except for CKS. At least in my case I was able to complete all of the tasks in the simulation without any problem. However, the tasks on my exam were a bit harder. Maybe it’s just bad luck, but still I wouldn’t recommend taking any Kubernetes exam without using the provided lab first.

3. Learn to find information in official documentation

As I already mentioned, the most important resource you have during the exam is the official Kubernetes documentation.
Learn the structure of it to efficiently find the information you need. There are different types of documents there – some give a quick overview of a specific concept, and some contain many examples. You need the latter ones because there’s no time or need to learn the concepts.

I often use the official documentation to learn about specifics of the resource I need to use, but I’ve found that during the exam the faster option is to use the ‘kubectl explain’ command. It’s easier to copy the found option into your manifest.
Learn how to use it and you’ll save yourself some time.

4. Use vim

I didn’t check if there are other editors available in the exam’s environment for one simple reason – when I work in the console I use vim/vi. I highly recommend learning it if you haven’t done so already.
If it’s not your daily editor (I use mostly VS code) then I recommend refreshing a few important shortcuts and commands:

  • Quit with saving – Use shift+z+z which is faster than traditional ‘:wq’. If not for speed then at least I would use it to provoke questions from intrigued colleagues 😉 
  • Delete whole line – dd
  • Change whole line – cc
  • Change word – cw
  • Change the word under the cursor – caw
  • Move to the top of the file – gg
  • Move to the bottom of the file – shift+g
  • Search the file – “/” and then “n” for the next occurence

5. Read very carefully

When you are in the middle of passing an exam, you feel the pressure and often you may miss some important information. That’s why I recommend reading the task description carefully twice or even thrice.
Once, I found myself looking for information on the wrong Kubernetes component and after a bit of frustration growing in me (I couldn’t find the option required by the task), I read back the task content once again and found I lost a few minutes looking in the wrong place.

I would also recommend reading the existing configuration files from top to bottom. They are yaml files and as you know the fields can be put in any order. Don’t expect the usual format with lexicographical order, like I did.

6. Leave the hard tasks to the end

I guess this is a general rule for any exam, but I’ll emphasize it anyway. During my CKS exam, I spent too much time on a particularly long and difficult task, naively expecting to be able to solve it with documentation or some experimentation, and this approach probably cost me my first failed attempt to pass CKS.

Remember that you don’t need 100% points. to pass There are passing thresholds for each exam, and they are much lower but no one knows how many points are given for each task. It’s better to solve the easy ones first and then move on to the harder ones.

7. Know NetworkPolicy really well

This applies mostly to CKS and CKA. I find the NetworkPolicy resource a bit complex and that’s why, like most of the people, I use this editor to create netpol objects.
However, this is not possible during the exams. You need to learn to create them from scratch. There is no helpful command for that like for RBAC, and so all you have to do is practice writing egress and ingress rules in various configurations.

8. Know apiserver very well

You’ve probably read that you need to learn the kube-apiserver component. And just like Ron Swanson, let me repeat that – you really need to learn it very, I mean VERY WELL.

I cannot stress this enough. This component is crucial for Kubernetes and also for you as a potential, future certified export on it.
You need to know most of the options (its command line flags) and how to apply them. Because the exams are hands-on, you risk breaking your cluster if you misconfigure your kube-apiserver, so please remember to make backups of the config files.

9. Practice backup and restore of etcd

Funny thing about these Kubernetes exams is that they assume you’ve worked with the control plane servers or you’re going to. In fact, many organizations choose to use Kubernetes-as-a-Service rather than managing the control plane part. I get it – it’s much easier.
However, from the exams perspective it doesn’t matter – you need to know how to operate control plane nodes.

So, if you haven’t worked with etcd and/or kubeadm, there might be a bit of work ahead of you to learn them, as it’s essential to know how to backup and properly restore your cluster.

10. Implement all changes and then restart

Last advice is purely technical. Restarting the services takes time (about 30-60 seconds), and if you do it multiple times, it can add up to a few precious minutes. And trust me if I repeat it once all over again – every minute counts.
Read the instructions carefully, and if changes are required in one or more components of the control plane, save time by making all the changes once and then trigger restarts. Keep in mind that for static manifests, Kubelet monitors changes in those files and restarts the containers accordingly.

Conclusion

Remember, you could be the most knowledgeable Kubernetes user/admin/architect and still fail the exam because of the environment, lack of time to learn along the way, or simply the way the tasks are presented.

I hope you’ll find my tips helpful, and I wish you the best of luck on your Kubernetes certification journey!

cloudowski

Interested in what I write about?
Stay up to date with my content and sign up for my newsletter.