Kubernetes |
Short cut to save time during exam
- Bookmark important pages in Browser. (If you have to refer too many times you will run out of time)
- Configure Auto-Complete. [1]
- Practice common jmespath options [2]
- Be good with vi commands for text modification
- Use copy Paste (YY - P) and modify (CE) to maintain indentation corretly
- Practice Volumes, Config Maps and mount options with correct indentation and section. [3]
[1]
alias set=’k config set-context `k config current-context` ‘
kubectl config set-context --current --namespace=devealias
k
=
kubectl
complete
-F __start_kubectl k
[2]
kubectl get pods -o
=
jsonpath
=
'{.items[0].metadata.name}'
kubectl get pods -o
=
jsonpath
=
"{.items[*]['metadata.name', 'status.capacity']}"
k get nodes -o
jsonpath
=
'{.items[*].status.addresses[?(@.type=="ExternalIP")].address}'