Last active
April 29, 2024 14:58
-
-
Save qudongfang/7a11c3e42aec98110ba7c60cd607fe8f 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
for c in $(kubectx | grep -v gov | grep -v dev); do | |
echo $c; | |
kubectx $c | |
kubectl -n istio-system patch iop istio-control-plane --type=json --patch='[ { "op": "remove", "path": "/metadata/finalizers" } ]' | |
istioctl tag set default --revision 1-20-5 --overwrite | |
kubectl -n flux-system --wait=false delete kustomization/istio-operator-bootstrap | |
kubectl -n istio-system --wait=false delete hr istio-operator | |
kubectl annotate MutatingWebhookConfiguration istio-revision-tag-default --overwrite meta.helm.sh/release-name=istiod-blue meta.helm.sh/release-namespace=istio-system | |
kubectl label MutatingWebhookConfiguration istio-revision-tag-default --overwrite app.kubernetes.io/managed-by=Helm | |
kubectl -n istio-system annotate --overwrite serviceaccount/istio-reader-service-account meta.helm.sh/release-name=istio-base meta.helm.sh/release-namespace=istio-system | |
kubectl -n istio-system label --overwrite serviceaccount/istio-reader-service-account app.kubernetes.io/managed-by=Helm | |
kubectl annotate --overwrite ValidatingWebhookConfiguration/istiod-default-validator meta.helm.sh/release-name=istio-base meta.helm.sh/release-namespace=istio-system | |
kubectl label --overwrite ValidatingWebhookConfiguration/istiod-default-validator app.kubernetes.io/managed-by=Helm | |
kubectl delete deployments istio-ingressgateway -n istio-system | |
kubectl delete hpa istio-ingressgateway -n istio-system | |
kubectl delete pdb istio-ingressgateway -n istio-system | |
kubectl delete svc istio-ingressgateway -n istio-system --wait=false | |
kubectl -n istio-system patch iop istio-control-plane --type=json --patch='[ { "op": "remove", "path": "/metadata/finalizers" } ]' | |
kubectl delete iop istio-control-plane -n istio-system --wait=false | |
istioctl tag set default --revision 1-20-5 --overwrite | |
done | |
# https://gist.github.com/qudongfang/caf14a5fddef540edc33b79fbc8db40b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment