Created
October 25, 2016 13:48
-
-
Save wombat/370743308c7c5d526218fc1c1989e753 to your computer and use it in GitHub Desktop.
Kubernetes - Old ReplicaSet cleanup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl get rs --all-namespaces | awk {' if ($3 == 0 && $4 == 0) system("kubectl delete rs "$2" --namespace="$1)'} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment