Skip to content

Tips and Tricks - Helping Tools

Change default editor (Vim) to nano

Edit

Bash
nano ~/.bashrc
Add a line (on the bottom of the file)
Bash
export KUBE_EDITOR="nano"

Bash
source ~/.bashrc

If you need to see join command again

Bash
kubeadm token create --print-join-command

Enable kubectl autocomplete (bash)

Bash
echo 'source <(kubectl completion bash)' >>~/.bashrc

Enable kubectl autocomplete (zsh)

Bash
echo "source <(kubectl completion zsh)" >> ~/.zshrc

Prune Containerd Unused Images (Run on nodes)

Bash
crictl rmi --prune

Delete evicted pods

Bash
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod