Paying attention to context switching and namespace for every question

This one is quite simple but also easy to miss, Before attempting any question be sure to check the cluster and the namespace where the solution is supposed to be implemented on

e.g:

kubectl config use-context the-cluster-name kubectl config set-context $(kubectl config current-context) --namespace the-namespace-name

Using imperative commands as much

the below commands can be used to create resources using command line for version 1.17 which is the current version for the exam as of the date of this posting; below is just a sample there are quite few others which can be used.

e.g:

kubectl run pod-name --image nginx --restart Always {creates deployment} kubectl run pod-name --image nginx --restart Never {creates Pod} kubectl create job job-name --image=busybox -- echo "hi" {creates Job} kubectl create cronjob thecron-job --image=busybox --schedule="*/1 * * * *" -- bin/sh -c "date; echo hi" {creates cronjob}

Saving ur resource manifests as “yaml” before creating the resources

I made sure to save all my resource definitions as yamls and in most cases named them as the question number; this comes quite handy if you need to redeploy the resource and i had to do it countless times during the exam. The --dry-run -o yaml option ensures that the resource is not created and the output is set as yaml

e.g:

kubectl run pod-name --image image-name --restart Never --dry-run -o yaml > 05.yaml

Creating aliases

This by far was the most useful feature which saves a lot of time during the exam, some useful aliases which i set for myself mentioned below

e.g:

alias k='kubectl'

alias kp='kubectl get pods --show-labels'

alias kdrp='kubectl run --dry-run -o yaml --restart Never'

alias kdrd='kubectl run --dry-run -o yaml'

alias sv='sudo vi'

alias ka='kubectl apply -f'

Force delete with 0 Grace period

Many a times when you need to delete a resource created you need to wait for the deletion to complete which can consume time during the exam; Force deletions do not wait for confirmation from the kubelet that the Pod has been terminated. Irrespective of whether a force deletion is successful in killing a Pod, it will immediately free up the name from the apiserver

e.g:

kubectl delete po pod-name --force --grace-period=0 this in conjuntion with aliases will look like alias kdelp='kubectl delete --force --grace-period=0 po' kdelp pod-name

Bookmarking the kubernetes.io/docs specific pages

Was allowed to use one extra tab along with the terminal to visit the kubernetes.io/docs pages; book marking specific section from the documentation helps to get the relevant info faster

there are some blogs which give handcrafted bookmarks which can be imported, but i would suggest you create your own so you are more aware of where each one sits

Paying attention to the weightage on the questions

Common sense demands that we spend less time on questions which has less weight but in the heat of the exam we tend to forget these small things, being aware of the weightage and then focusing on the question will definitely help

Spending time learning some shortcuts in Vi

Shortcuts for Navigating and doing simple actions as cut/copy/paste are quite different when doing in Vi editor; Spending some time researching and practising those would come quite handy.