Deleting Kuma mesh (standalone k8s installation)

7/31/2021

Even deleting namespace kuma-system and it's resources does not reset the information presented in the control plane GUI. What am I doing wrong?

-- Muli Yulzary
kubernetes
kuma

1 Answer

8/2/2021

You can delete Kuma with almost the same command you used to install it.

$ ./kumactl install control-plane | kubectl apply -f -

changing apply to delete should do the trick.


To confirm that, I quickly installed Kuma on my cluster

$ 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

and then removed it

$ ./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

now, there are no Kuma resources on my cluster

$ kubectl get all --all-namespaces | grep kuma
(nothing found)
-- p10l
Source: StackOverflow