diff --git a/website/docs/user-guides/uninstall-litmus.md b/website/docs/user-guides/uninstall-litmus.md index 72b630e..287ef2b 100644 --- a/website/docs/user-guides/uninstall-litmus.md +++ b/website/docs/user-guides/uninstall-litmus.md @@ -8,29 +8,63 @@ sidebar_label: Uninstall Litmus To disconnect the [ChaosAgent](../getting-started/resources#chaosagents) connected to the [ChaosCenter](../getting-started/resources#chaoscenter), follow these steps - -1. Login to the ChaosCenter and navigate to the ChaosAgents Tab. -2. Click on the `Disconnect icon` Disconnect Icon of the respective ChaosAgent you want to disconnect. -3. On the Modal that appears, confirm your selection by clicking `Yes` and the selected ChaosAgent would be disconnected from the ChaosCenter. +1. Remove the ChaosEngines of the respective ChaosAgent + + ```bash + kubectl delete chaosengine --all - + ``` + + > If ChaosEngines is unable to delete successfully then the Kubernetes finalizers need to be removed manually. + +2. Login to the ChaosCenter and navigate to the ChaosAgents Tab. +3. Click on the `Disconnect icon` Disconnect Icon of the respective ChaosAgent you want to disconnect. +4. On the Modal that appears, confirm your selection by clicking `Yes` and the selected ChaosAgent would be disconnected from the ChaosCenter. :::note The above disconnect would remove the subscriber component from ChaosAgent and thus removing the connectivity between the ChaosAgent and the ChaosCenter. If the ChaosAgent is not reachable it would remove only the entry from the database of the ChaosCenter ::: +### Removing the respective components individually + To remove the respective components of the ChaosAgents you need to manually delete the created resources of that ChaosAgent. ```bash -kubectl delete chaosengine --all -A -kubectl delete chaosexperiments --all -A -kubectl delete chaosresults --all -A +kubectl delete chaosexperiments --all - +kubectl delete chaosresults --all - +kubectl delete workflows --all - +kubectl delete cronworkflows --all - +kubectl delete deployment chaos-operator-ce chaos-exporter --all - ``` +### Removing all components + To remove all the ChaosAgents component ever created from the system, apply this command. ```bash kubectl delete chaosengine,chaosexperiments,chaosresults --all -A +kubectl delete workflows cronworflows --all - +kubectl delete deployment chaos-operator-ce chaos-exporter --all -A ``` +### Removing Service Account, Role Bindings and Roles + +#### For Cluster Scope + +```bash +kubectl delete sa litmus litmus-admin litmus-cluster-scope litmus-server-account -n - +kubectl delete clusterrolebindings litmus-admin litmus-admin-crb-for-litmusportal-server litmus-cluster-scope litmus-cluster-scope-crb-for-litmusportal-server litmus-server-crb subscriber-crb-for-litmusportal-server +kubectl delete clusterrole litmus-admin litmus-admin-crb-for-litmusportal-server litmus-cluster-scope litmus-cluster-scope-crb-for-litmusportal-server litmus-server-crb subscriber-crb-for-litmusportal-server +``` + +#### For Namespace Scope + +```bash +kubectl delete sa rolebindings role --all -n +``` + +--- + ## ChaosCenter To uninstall the ChaosCenter from the system, follow these steps -