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 | sh
When 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 yaml
kubectl 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 yaml
kubectl run tmp --restart=Never --rm -i --image=nginx:alpine -- curl 10.44.0.78
--restart=Never
will disable restarting the pod after it finished the command. If not supplied we won't see any output in the terminal--rm
will remove the pod after running the command-i
makes 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