Learning Kubernetes with the Game of Pods
Recently I finally took the time to dive into the world of Kubernetes with as my ultimate goal to obtain the CKA and CKAD certificates. After I started with quite some theory, I was looking for fun exercises to practice the k8s basics and kubectl, and to get more confident with the manifest yamls. The exercises from Game of Pods were perfect for this.
Game of Pods consists of a number of Katacoda scenarios. All scenarios have some flavour of Game of Thrones, which is just a fun gimmick in which they have put quite some effort, see the introduction video! But what matters more, the scenarios are all good and fun to do! They even made a nice Westeros map where you can choose which assignment you want to do.
For each scenario, you get a description of the desired architecture, a two-node k8s cluster, a terminal with kubectl and one hour to finish it. While you are working you can verify the current state by using the “Check” button. It shows you which part of the architecture is already correct and which part is not.
There are six scenarios. Most architectures consist of a number of “basic” resources such as configMaps, Deployments, Volumes and Services together with one or two more advanced resources such as statefullSets and persistentVolumeClaims, initContainers, RBAC and kubectl configurations. There is one exception, the scenario called Pento. Here you need to show your troubleshooting skills and fix a broken k8s cluster. This is quite challenging but doable and satisfying to solve.
The nice thing about all these scenarios is that each time you practice and speed up the basics and you get familiar with a new advanced subject, all with a nice feedback mechanism.
In the image below you see an example of the desired architecture on the right, and the terminal with a 2-node Kubernetes cluster on the left.
CKA / CKAD hints
Since my goal is to earn the CKA or CKAD certificate. I have tried to stay within the boundaries of the exam. So I was only allowed to use the official k8s docs and the kubectl help command. This made me discover that
kubectl <command> --help actually contains a lot of useful examples.
I also tried to gain some kubectl speed because the exam seems to require that. One thing I found very useful is the output option
kubectl <command> ... -o yaml. This prints the yaml produced by the command. For instance
kubectl run nginx --image=nginx -o yaml prints the yaml needed to create a Deployment of an nginx Pod. It saves a lot of time writing yaml, it saves you from making annoying yaml typo’s and in some cases, you can benefit from provided cli options and command completion.
Altogether, if you are studying for CKA or CKAD, you should definitely take a look at Game of Pods. It’s a very nice and fun way to practice your skills and prepare yourself.
Visit KodeKloud to start playing right away!