Created
April 26, 2018 07:42
-
-
Save Stono/a0d8883cca7206382cd5d2af74193d0c to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
echo "Deleting istio components..." | |
array=( istio istio-crd istio-grafana istio-prometheus istio-jaeger kube-state-metrics prometheus-alertmanager ) | |
for i in "${array[@]}" | |
do | |
echo " - Removing: $i" | |
helm del --purge $i | |
done | |
echo "Removing all custom resource definitions..." | |
kubectl get crd | grep -i istio | awk '{print $1}' | xargs -n 1 kubectl delete crd | |
echo "Deleting istio namespace..." | |
kubectl delete --cascade namespace istio-system | |
echo "Removing all istio secrets..." | |
kubectl get secrets --all-namespaces | grep "istio\." | awk '{print "kubectl delete secret -n "$1" "$2}' | bash - | |
echo "Removing mutating webhook stuff..." | |
kubectl delete MutatingWebhookConfiguration istio-sidecar-injector |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment