Uninstalling Litmus
Chaos Infrastructure​
To disconnect the Chaos Infrastructure connected to the ChaosCenter, follow these steps -
Remove the ChaosEngines of the respective Chaos Infrastructure
kubectl delete chaosengine <CHAOSENGINE_NAMEs> --all -<AGENT_NAMESPACE>
note
If ChaosEngines is unable to delete successfully then the Kubernetes finalizers need to be removed manually.
Login to the ChaosCenter and navigate to the Chaos Infrastructures Tab.
Click on the
Disconnect icon
of the respective Chaos Infrastructure you want to disconnect.On the Modal that appears, confirm your selection by selecting Yes and the selected Chaos Infrastructure would be disconnected from the ChaosCenter.
note
The above disconnect would remove the subscriber component from Chaos Infrastructure and thus removing the connectivity between the Chaos Infrastructure and the ChaosCenter.
If the Chaos Infrastructure is not reachable it would remove only the entry from the database of the ChaosCenter
Remove the CRs​
To remove the CRs, use the following commands:
- To remove individual CRs
kubectl delete chaosexperiments <CHAOSEXPERIMENTS_NAMEs> -n <AGENT_NAMESPACE>
kubectl delete chaosresults <CHAOSRESULTS_NAMEs> -n <AGENT_NAMESPACE>
kubectl delete workflows <WORKFLOW_NAMEs> -n <AGENT_NAMESPACE>
kubectl delete cronworkflows <CRONWORKFLOW_NAMEs> -n <AGENT_NAMESPACE>
kubectl delete eventtrackerpolicies -n <AGENT_NAMESPACE>
- To remove all CRs
kubectl delete chaosengine,chaosexperiments,chaosresults --all <AGENT_NAMESPACE>
kubectl delete workflows cronworflows --all <AGENT_NAMESPACE>
kubectl delete eventtrackerpolicies -n <AGENT_NAMESPACE>
Delete the Deployments​
To remove the respective deployments of the Chaos Infrastructure you need to manually delete them.
kubectl delete deployment chaos-operator-ce event-tracker workflow-controller chaos-exporter -n <AGENT_NAMESPACE>
Removing Service Account, Role Bindings and Roles​
For cluster scope​
kubectl delete sa argo argo-chaos litmus-admin litmus-cluster-scope event-tracker-sa -n -<AGENT_NAMESPACE>
kubectl delete clusterrolebindings argo-binding chaos-cluster-role-binding event-tracker-clusterole-binding litmus-admin litmus-cluster-scope subscriber-cluster-role-binding
kubectl delete clusterrole litmus-admin chaos-cluster-role subscriber-cluster-role event-tracker-cluster-role litmus-cluster-scope argo-aggregate-to-admin argo-aggregate-to-edit argo-aggregate-to-view argo-cluster-role
For namespace scope​
kubectl delete sa rolebindings role --all -n <NAMESPACE>
Remove the CRDs​
note
If the Litmus CRDs are deleted in the cluster scope all the respective custom resources in the individual namespaces would stop working.
To remove all the CRDs uses, use the following command:
kubectl delete -f https://raw.githubusercontent.com/litmuschaos/litmus/master/litmus-portal/manifests/litmus-portal-crds.yml
ChaosCenter​
To remove the Self Chaos Infrastructure Resources you need to follow the above Chaos Infrastructure Uninstall process.
To uninstall the ChaosCenter from the system, follow these steps -
Using Kubectl​
For Cluster Scope​
Litmus 3.7.0
kubectl delete -f https://litmuschaos.github.io/litmus/3.7.0/litmus-cluster-scope-3.7.0.yaml
note
To delete any specific version of the ChaosCenter, replace the above command with the below command.
kubectl delete -f https://raw.githubusercontent.com/litmuschaos/litmus/<VERSION>/docs/<VERSION/litmus-<VERSION>.yaml
Litmus Master Manifest
kubectl delete -f https://raw.githubusercontent.com/litmuschaos/litmus/master/litmus-portal/manifests/cluster-k8s-manifest.yml
For Namespace Scope​
kubectl delete -f ${LITMUS_PORTAL_NAMESPACE}-ns-scoped-litmus-portal-manifest.yml -n ${LITMUS_PORTAL_NAMESPACE}
Using Helm​
helm uninstall litmuschaos --namespace litmus
kubectl delete ns litmus
note
The namespace doesn't have to be litmus
necessarily, instead it should be the namespace where ChaosCenter is installed.