Uninstall Chaos Mesh

    This document introduces how to uninstall Chaos Mesh, including uninstall Chaos Mesh with Helm and uninstall Chaos Mesh manually. It’s also very helpful to manually purge Chaos Mesh installation from Kubernetes cluster if you have to do.

    Before uninstall Chaos Mesh, please make sure that all the chaos experiments are deleted. You could list chaos related objects by executing:

    Once you make sure that all the chaos experiments are deleted, you can uninstall Chaos Mesh.

    Step 2: List Helm Releases

    You could list the installed helm release by executing:

    The output should look like:

    It means that Chaos Mesh has been installed as a helm release named chaos-mesh-playground in namespace chaos-mesh. So here is the target release to uninstall.

    Step 3: Delete Helm Releases

    1. helm uninstall chaos-mesh-playground -n chaos-mesh

    helm uninstall would not remove the CRDs, so you could remove them manually by executing:

    Uninstall Chaos Mesh Manually

    If you installed Chaos Mesh by script , or you modified some configurations and components after Chaos Mesh installed, or you meet some troubles when uninstalling Chaos Mesh, here are some steps could help you to uninstall Chaos Mesh manually.

    Step 1: Clean Up Chaos Experiments

    Before uninstall Chaos Mesh, please make sure that all the chaos experiments are deleted. You could list chaos related objects by executing:

    1. for i in $(kubectl api-resources | grep chaos-mesh | awk '{print $1}'); do kubectl get $i -A; done

    Once you make sure that all the chaos experiments are deleted, you can uninstall Chaos Mesh.

    Step 2: Remove Chaos Mesh Workloads

    There are usually several kind of components as Chaos Mesh installed:

    • A Deployment called chaos-controller-manager, it is the controller/reconciler for Chaos Mesh.
    • A DaemonSet called , it is the agent for Chaos Mesh on each Kubernetes worker node.
    • A Deployment called chaos-dns-server, it is the DNS proxy server, only occurs with you enable the DNSChaos feature.

    You should remove these workload objects.

    • chaos-daemon
    • chaos-dashboard
    • chaos-mesh-controller-manager
    • chaos-mesh-dns-server

    There are several RBAC objects as Chaos Mesh installed:

    • ClusterRoleBinding
      • chaos-mesh-playground-chaos-controller-manager-cluster-level
      • chaos-mesh-playground-chaos-controller-manager-target-namespace
      • chaos-mesh-playground-chaos-dns-server-cluster-level
      • chaos-mesh-playground-chaos-dns-server-target-namespace
    • ClusterRole
      • chaos-mesh-playground-chaos-controller-manager-cluster-level
      • chaos-mesh-playground-chaos-controller-manager-target-namespace
      • chaos-mesh-playground-chaos-dns-server
      • chaos-mesh-playground-chaos-dns-server-cluster-level
    • RoleBinding
      • chaos-mesh-playground-chaos-controller-manager-control-plane
    • Role
      • chaos-mesh-playground-chaos-controller-manager-control-plane
      • chaos-mesh-playground-chaos-dns-server-control-plane
    • ServiceAccount
      • chaos-controller-manager
      • chaos-daemon
      • chaos-dns-server

    You should remove these RBAC objects.

    Step 4: Remove ConfigMaps And Secrets

    There are several ConfigMaps and Secrets as Chaos Mesh installed:

    • ConfigMap
      • chaos-mesh
      • dns-server-config
    • Secret
      • chaos-mesh-webhook-certs

    You should remove these ConfigMaps And Secrets objects.

    Step 5: Remove Webhook

    There are several Webhooks as Chaos Mesh installed:

    • ValidatingWebhookConfigurations
      • chaos-mesh-validation
      • validate-auth
    • MutatingWebhookConfigurations
      • chaos-mesh-mutation

    You should remove these webhooks.