kubectl-evict
A kubectl plugin to evict pods. This plugin is good to remove a pod from your
cluster or to test your PodDistruptionBudget.
๐ฟ Installation
$ go install github.com/stromvirvel/kubectl-evict@latest
๐ Usage
Evict a pod nginx:
$ kubectl evict nginx
Evict all pods defined by label app=nginx:
$ kubectl evict -l app=nginx
Evict all pods from of a deployment named nginx:
$ kubectl evict deployment/nginx
Evict all pods from node worker-1:
$ kubectl evict node/worker-1
๐ Developing
Create a cluster:
$ kind create cluster --config .kind/cluster.yaml
Then deploy nginx with a Deployment and PodDIsruptionBudget:
$ kubectl apply -f .kind/deployment.yaml -f .kind/pdb.yaml
๐ LICENSE
MIT