删除Kuma mesh(独立k8s安装)
Deleting Kuma mesh (standalone k8s installation)
即使删除命名空间 kuma-system
及其资源也不会重置控制平面 GUI 中显示的信息。我做错了什么?
您可以使用与安装它几乎相同的命令删除 Kuma。
$ ./kumactl install control-plane | kubectl apply -f -
将 apply
更改为 delete
应该可以解决问题。
为了确认这一点,我迅速在我的集群上安装了 Kuma
$ kubectl get all --all-namespaces | grep kuma
kuma-system pod/kuma-control-plane-774956d9c5-zh4vj 0/1 Running 0 11s
kuma-system service/kuma-control-plane ClusterIP 10.8.130.242 <none> 5681/TCP,5682/TCP,443/TCP,5676/TCP,5678/TCP,5653/UDP 14s
kuma-system deployment.apps/kuma-control-plane 0/1 1 0 13s
kuma-system replicaset.apps/kuma-control-plane-774956d9c5 1 1 0 13s
然后删除它
$ ./kumactl install control-plane | kubectl delete -f -
WARNING: Unable to confirm the server supports this kumactl version
namespace "kuma-system" deleted
serviceaccount "kuma-control-plane" deleted
secret "kuma-tls-cert" deleted
configmap "kuma-control-plane-config" deleted
customresourcedefinition.apiextensions.k8s.io "circuitbreakers.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "dataplanes.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "retries.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "serviceinsights.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "timeouts.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "trafficlogs.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "trafficpermissions.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "trafficroutes.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "traffictraces.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "zoneingressinsights.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "zoneinsights.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "zones.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "dataplaneinsights.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "zoneingresses.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "externalservices.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "faultinjections.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "healthchecks.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "meshinsights.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "meshes.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "proxytemplates.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "ratelimits.kuma.io" deleted
clusterrole.rbac.authorization.k8s.io "kuma-control-plane" deleted
clusterrolebinding.rbac.authorization.k8s.io "kuma-control-plane" deleted
validatingwebhookconfiguration.admissionregistration.k8s.io "kuma-validating-webhook-configuration" deleted
Error from server (NotFound): error when deleting "STDIN": roles.rbac.authorization.k8s.io "kuma-control-plane" not found
Error from server (NotFound): error when deleting "STDIN": rolebindings.rbac.authorization.k8s.io "kuma-control-plane" not found
Error from server (NotFound): error when deleting "STDIN": services "kuma-control-plane" not found
Error from server (NotFound): error when deleting "STDIN": deployments.apps "kuma-control-plane" not found
Error from server (Forbidden): error when deleting "STDIN": mutatingwebhookconfigurations.admissionregistration.k8s.io "kuma-admission-mutating-webhook-configuration" is forbidden: User "<obfuscated>" cannot delete resource "mutatingwebhookconfigurations" in API group "admissionregistration.k8s.io" at the cluster scope: GKEAutopilot authz: cluster scoped resource "mutatingwebhookconfigurations/" is managed and access is denied
现在,我的集群上没有 Kuma 资源
$ kubectl get all --all-namespaces | grep kuma
(nothing found)
即使删除命名空间 kuma-system
及其资源也不会重置控制平面 GUI 中显示的信息。我做错了什么?
您可以使用与安装它几乎相同的命令删除 Kuma。
$ ./kumactl install control-plane | kubectl apply -f -
将 apply
更改为 delete
应该可以解决问题。
为了确认这一点,我迅速在我的集群上安装了 Kuma
$ kubectl get all --all-namespaces | grep kuma
kuma-system pod/kuma-control-plane-774956d9c5-zh4vj 0/1 Running 0 11s
kuma-system service/kuma-control-plane ClusterIP 10.8.130.242 <none> 5681/TCP,5682/TCP,443/TCP,5676/TCP,5678/TCP,5653/UDP 14s
kuma-system deployment.apps/kuma-control-plane 0/1 1 0 13s
kuma-system replicaset.apps/kuma-control-plane-774956d9c5 1 1 0 13s
然后删除它
$ ./kumactl install control-plane | kubectl delete -f -
WARNING: Unable to confirm the server supports this kumactl version
namespace "kuma-system" deleted
serviceaccount "kuma-control-plane" deleted
secret "kuma-tls-cert" deleted
configmap "kuma-control-plane-config" deleted
customresourcedefinition.apiextensions.k8s.io "circuitbreakers.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "dataplanes.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "retries.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "serviceinsights.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "timeouts.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "trafficlogs.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "trafficpermissions.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "trafficroutes.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "traffictraces.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "zoneingressinsights.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "zoneinsights.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "zones.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "dataplaneinsights.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "zoneingresses.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "externalservices.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "faultinjections.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "healthchecks.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "meshinsights.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "meshes.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "proxytemplates.kuma.io" deleted
customresourcedefinition.apiextensions.k8s.io "ratelimits.kuma.io" deleted
clusterrole.rbac.authorization.k8s.io "kuma-control-plane" deleted
clusterrolebinding.rbac.authorization.k8s.io "kuma-control-plane" deleted
validatingwebhookconfiguration.admissionregistration.k8s.io "kuma-validating-webhook-configuration" deleted
Error from server (NotFound): error when deleting "STDIN": roles.rbac.authorization.k8s.io "kuma-control-plane" not found
Error from server (NotFound): error when deleting "STDIN": rolebindings.rbac.authorization.k8s.io "kuma-control-plane" not found
Error from server (NotFound): error when deleting "STDIN": services "kuma-control-plane" not found
Error from server (NotFound): error when deleting "STDIN": deployments.apps "kuma-control-plane" not found
Error from server (Forbidden): error when deleting "STDIN": mutatingwebhookconfigurations.admissionregistration.k8s.io "kuma-admission-mutating-webhook-configuration" is forbidden: User "<obfuscated>" cannot delete resource "mutatingwebhookconfigurations" in API group "admissionregistration.k8s.io" at the cluster scope: GKEAutopilot authz: cluster scoped resource "mutatingwebhookconfigurations/" is managed and access is denied
现在,我的集群上没有 Kuma 资源
$ kubectl get all --all-namespaces | grep kuma
(nothing found)