Uninstalling Litmus
#
ChaosAgentsTo disconnect the ChaosAgent connected to the ChaosCenter, follow these steps -
Remove the ChaosEngines of the respective ChaosAgent
kubectl delete chaosengine <CHAOSENGINE_NAMEs> --all -<AGENT_NAMESPACE>
If ChaosEngines is unable to delete successfully then the Kubernetes finalizers need to be removed manually.
Login to the ChaosCenter and navigate to the ChaosAgents Tab.
Click on the
Disconnect icon
of the respective ChaosAgent you want to disconnect.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
#
Remove the CRsTo remove the CRs Litmus uses, use the following command:
- 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 DeploymentsTo remove the respective deployments of the ChaosAgents 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 Scopekubectl 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-bindingkubectl 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 Scopekubectl delete sa rolebindings role --all -n <NAMESPACE>
#
Remove the Litmus CRDsnote
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 Litmus uses, use the following command:
kubectl delete -f https://raw.githubusercontent.com/litmuschaos/litmus/master/litmus-portal/litmus-portal-crds.yml
#
ChaosCenterTo remove the Self Agent Resources you need to follow the above ChaosAgent Uninstall process
To uninstall the ChaosCenter from the system, follow these steps -
#
Using Kubectl#
For Cluster ScopeLitmus 2.2.0
kubectl delete -f https://raw.githubusercontent.com/litmuschaos/litmus/master/mkdocs/docs/2.2.0/litmus-2.2.0.yaml
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/cluster-k8s-manifest.yml
#
For Namespace Scopekubectl delete -f ${LITMUS_PORTAL_NAMESPACE}-ns-scoped-litmus-portal-manifest.yml -n ${LITMUS_PORTAL_NAMESPACE}
#
Using Helmhelm uninstall litmuschaos --namespace litmuskubectl delete ns litmus
The namespace doesn't have to be
litmus
necessarily, instead it should be the same namespace where Litmus ChaosCenter is installed.