Various Links
kubectl trics and conventions
Change default editor (Vim) to nano
Edit
Add a line (on the bottom of the file)
Bashexport KUBE_EDITOR="nano"
If you need to see join command again
Bashkubeadm token create --print-join-command
Enable kubectl autocomplete (bash)
Bashecho 'source <(kubectl completion bash)' >>~/.bashrc
Enable kubectl autocomplete (zsh)
Bashecho "source <(kubectl completion zsh)" >> ~/.zshrc
Prune Containerd Unused Images (Run on nodes)
Delete evicted pods
Bashkubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
Namespace stuck in terminating state
Bashkubectl get namespace "<NAMESPACE>" -o json \
| tr -d "\n" | sed "s/\"finalizers\": \[[^]]\+\]/\"finalizers\": []/" \
| kubectl replace --raw /api/v1/namespaces/<NAMESPACE>/finalize -f -