Skip to content
Safe operations in kubectl with plugin kubectlsafe
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Plugin for kubectl for safe write operations in Kubernetes

Before every write (apply, create, etc...) operation kubectl will ask you about you choise


It's simple as 1, 2, 3:

Download kubectl-safe to /usr/local/bin, add eXecutable bit and add to your aliases

sudo wget -O /usr/local/bin/kubectl-safe
sudo chmod +x /usr/local/bin/kubectl-safe
echo "alias kubectl='kubectl safe'" >> $HOME/.bashrc
. $HOME/.basrc

If you don't have root access, you can do like that:

mkdir $HOME/bin
wget -O $HOME/bin/kubectl-safe
chmod +x $HOME/bin/kubectl-safe
echo "alias kubectl='kubectl safe'" >> $HOME/.bashrc
. $HOME/.basrc

That's all


andrey@andreypc:~$ kubectl delete pod nginx-549cfdbc34-jdos4
Current context is kube-prod. Show must go on? y #Only after that operation will begin
pod "nginx-549cfdbc34-jdos4" deleted


Feel free to ask questions and apply new ideas

Happy kubectling! :)

You can’t perform that action at this time.