area(user-guide): Updating Uninstallation Docs (#78)

* Updating Uninstallation Docs
* Updated Formatting
* Removed namespace for Cluster Scope Bindings
* Restructuring

Signed-off-by: Sayan Mondal <sayan@chaosnative.com>
This commit is contained in:
Sayan Mondal 2021-08-11 13:23:13 +05:30 committed by GitHub
parent caf01a9741
commit 8a40142db5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 40 additions and 6 deletions

View File

@ -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` <img src={require("../assets/user-guides/uninstall-litmus/disconnect-icon.png").default} alt="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 <CHAOSENGINE_NAMEs> --all -<AGENT_NAMESPACE>
```
> 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` <img src={require("../assets/user-guides/uninstall-litmus/disconnect-icon.png").default} alt="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 <CHAOSENGINE_IDs> --all -A
kubectl delete chaosexperiments <CHAOSEXPERIMENTS_IDs> --all -A
kubectl delete chaosresults <CHAOSRESULTS_IDs> --all -A
kubectl delete chaosexperiments <CHAOSEXPERIMENTS_NAMEs> --all -<AGENT_NAMESPACE>
kubectl delete chaosresults <CHAOSRESULTS_NAMEs> --all -<AGENT_NAMESPACE>
kubectl delete workflows <WORKFLOW_NAMEs> --all -<AGENT_NAMESPACE>
kubectl delete cronworkflows <CRONWORKFLOW_NAMEs> --all -<AGENT_NAMESPACE>
kubectl delete deployment chaos-operator-ce chaos-exporter --all -<AGENT_NAMESPACE>
```
### 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 -<AGENT_NAMESPACE>
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 -<AGENT_NAMESPACE>
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 <NAMESPACE>
```
---
## ChaosCenter
To uninstall the ChaosCenter from the system, follow these steps -