Skip to content

Instantly share code, notes, and snippets.

@ymesika
Created May 20, 2018 05:34
Show Gist options
  • Save ymesika/67bccc861cbdd3e9c4a66766ca01eaf9 to your computer and use it in GitHub Desktop.
Save ymesika/67bccc861cbdd3e9c4a66766ca01eaf9 to your computer and use it in GitHub Desktop.
Istio Cleanup Script
#!/bin/bash
# Script to cleanup leftovers after invoking `helm del --purge istio`
protos=( all cm secrets sa clusterrolebinding clusterrole crd )
for proto in "${protos[@]}"; do
for resource in $(kubectl get $proto -n istio-system | grep istio | awk 'NR>1{print $1}'); do
kubectl delete $proto $resource -n istio-system
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment