使用 helm 删除 istio 会留下许多工件,其中一些我无法删除。我该如何删除它?
Using helm to delete istio leaves a number of artifacts, some of which I can't delete. How do I delete it?
当我尝试使用
从我的集群中删除 istio(如果重要,则为 AKS)
helm del --purge istio
它似乎有效。然而,当我再次尝试安装 istio 时,我收到了很多关于已经存在的东西的错误。诸如 "gateways.networking.istio.io"、"istio-grafana-post-install" 之类的东西。我写了一个脚本来手动清理剩菜,但它在作业上失败了。特别是
Error: jobs.batch "istio-security-post-install" already exists
我似乎无法使用 kubectl 删除此资源。我不确定为什么,但找不到它。
我的问题是双重的
- 卸载 istio 的正确方法是什么,这样它就不会留下所有这些工件?
and/or
- 清理所有未正确删除的 istio 工件的最佳方法是什么?
谢谢,
埃里克
GitHub 上的 helm delete 存在问题,但应该已通过 "upgrading to 2.12.1" 修复,不确定您使用的是哪个版本的 helm。
我可以使用以下命令删除 Istio 安装。
helm del --purge istio
kubectl delete -f .\install\kubernetes\istio-demo.yaml
我能够删除 Istio,但是在删除之后我可以重新安装它而不会出现错误或超时(导致 pod 处于 ContainerCreating 状态)的唯一方法如下:
首次安装:
1) 按照 here
中的步骤操作
2)然后安装Helm:
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get > get_helm.sh
chmod 700 get_helm.sh
./get_helm.sh
kubectl create serviceaccount tiller --namespace kube-system
kubectl create clusterrolebinding tiller-cluster-rule \
--clusterrole=cluster-admin \
--serviceaccount=kube-system:tiller
helm init --service-account=tiller
3) 安装 Istio:
helm install install/kubernetes/helm/istio --name istio --namespace istio-system
删除:
1) kubectl delete -f $HOME/istio.yaml
2) helm delete --purge istio
3) kubectl delete ns istio-system
3) kubectl delete -f install/kubernetes/helm/istio/templates/crds.yaml -n istio-system
*是的,这些基本上都是文档中的所有 3 种卸载方法,但它确保所有组件都被删除)
4) 再次安装 Istio(重新安装适用于 helm template
和 helm install
方法):
helm install install/kubernetes/helm/istio --name istio --namespace istio-system
回答你的主要问题,似乎这仍然不是很明显,也没有 100% 正确的方法:。你可以在这个 github issue 中阅读更多关于这个的内容.
当我尝试使用
从我的集群中删除 istio(如果重要,则为 AKS)helm del --purge istio
它似乎有效。然而,当我再次尝试安装 istio 时,我收到了很多关于已经存在的东西的错误。诸如 "gateways.networking.istio.io"、"istio-grafana-post-install" 之类的东西。我写了一个脚本来手动清理剩菜,但它在作业上失败了。特别是
Error: jobs.batch "istio-security-post-install" already exists
我似乎无法使用 kubectl 删除此资源。我不确定为什么,但找不到它。
我的问题是双重的
- 卸载 istio 的正确方法是什么,这样它就不会留下所有这些工件?
and/or
- 清理所有未正确删除的 istio 工件的最佳方法是什么?
谢谢, 埃里克
GitHub 上的 helm delete 存在问题,但应该已通过 "upgrading to 2.12.1" 修复,不确定您使用的是哪个版本的 helm。
我可以使用以下命令删除 Istio 安装。
helm del --purge istio
kubectl delete -f .\install\kubernetes\istio-demo.yaml
我能够删除 Istio,但是在删除之后我可以重新安装它而不会出现错误或超时(导致 pod 处于 ContainerCreating 状态)的唯一方法如下:
首次安装:
1) 按照 here
中的步骤操作2)然后安装Helm:
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get > get_helm.sh
chmod 700 get_helm.sh
./get_helm.sh
kubectl create serviceaccount tiller --namespace kube-system
kubectl create clusterrolebinding tiller-cluster-rule \
--clusterrole=cluster-admin \
--serviceaccount=kube-system:tiller
helm init --service-account=tiller
3) 安装 Istio:
helm install install/kubernetes/helm/istio --name istio --namespace istio-system
删除:
1) kubectl delete -f $HOME/istio.yaml
2) helm delete --purge istio
3) kubectl delete ns istio-system
3) kubectl delete -f install/kubernetes/helm/istio/templates/crds.yaml -n istio-system
*是的,这些基本上都是文档中的所有 3 种卸载方法,但它确保所有组件都被删除)
4) 再次安装 Istio(重新安装适用于 helm template
和 helm install
方法):
helm install install/kubernetes/helm/istio --name istio --namespace istio-system
回答你的主要问题,似乎这仍然不是很明显,也没有 100% 正确的方法:。你可以在这个 github issue 中阅读更多关于这个的内容.