Some tips and common pitfalls for the CKAD exam.
Note: I am currently not sure if this would be allowed in the exam, as this is an external ressource.
# curl -s https://gist.github.com/6e3acd88f2f88394ad88e2dff1d8e530 | shWhen suppliying --dry-run=client -o yaml to kubectl we don't create resources right away, but are provided with the yaml the resources would be created with. This is helpfull to create pod or deployment yaml template.
kubectl ... --dry-run=client -o yamlkubectl run pod --image=nginx --dry-run=client -o yaml
kubectl create deployment nginx --image=nginx --dry-run=client -o yaml
kubectl create service clusterip nginx --tcp=443:80 --dry-run=client -o yamlkubectl run tmp --restart=Never --rm -i --image=nginx:alpine -- curl 10.44.0.78--restart=Neverwill disable restarting the pod after it finished the command. If not supplied we won't see any output in the terminal--rmwill remove the pod after running the command-imakes it interactive and will show the output of the command in the terminal
When converting strings into base64, the flag -n should be supplied to ensure no line breaks.
echo -n "..." | base64