ChaosCenter Cluster Scope Installation
#
PrerequisitesBefore deploying LitmusChaos, make sure the following items are there
Kubernetes 1.17 or later
A Persistent volume of 20GB
note
Recommend to have a Persistent volume(PV) of 20GB, You can start with 1GB for test purposes as well. This PV is used as persistent storage to store the chaos config and chaos-metrics in the Portal. By default, litmus install would use the default storage class to allocate the PV. Provide this value
#
InstallationInstallation of Litmus can be done using either of the below methods
#
Install Litmus using HelmThe helm chart will install all the required service account configuration and ChaosCenter.
The following steps will help you install Litmus ChaosCenter via helm.
#
Step-1: Add the litmus helm repositoryhelm repo add litmuschaos https://litmuschaos.github.io/litmus-helm/helm repo list
#
Step-2: Create the namespace on which you want to install Litmus ChaosCenter- The chaoscenter components can be placed in any namespace, though it is typically placed in "litmus".
kubectl create ns litmus
#
Step-3: Install Litmus ChaosCenterhelm install chaos litmuschaos/litmus --namespace=litmus
NAME: chaosLAST DEPLOYED: Wed Dec 15 20:18:37 2021NAMESPACE: litmusSTATUS: deployedREVISION: 1TEST SUITE: NoneNOTES:Thank you for installing litmus ๐
Your release is named chaos and it's installed to namespace: litmus.
Visit https://docs.litmuschaos.io to find more info.
Note: Litmus uses Kubernetes CRDs to define chaos intent. Helm3 handles CRDs better than Helm2. Before you start running a chaos experiment, verify if Litmus is installed correctly.
#
Install Litmus using kubectl#
Install Litmus ChaosCenterApplying the manifest file will install all the required service account configuration and ChaosCenter.
kubectl apply -f https://litmuschaos.github.io/litmus/2.4.0/litmus-2.4.0.yaml
If you are installing Litmus in any other namespace apart from
litmus
namespace, make sure to change the same in the manifest toohttps://litmuschaos.github.io/litmus/2.4.0/litmus-2.4.0.yaml
.
#
Verify your installation#
Verify if the frontend, server, and database pods are runningCheck the pods in the namespace where you installed Litmus:
Expected Outputkubectl get pods -n litmus
NAME READY STATUS RESTARTS AGElitmusportal-frontend-97c8bf86b-mx89w 1/1 Running 2 6m24slitmusportal-server-5cfbfc88cc-m6c5j 2/2 Running 2 6m19smongo-0 1/1 Running 0 6m16s
Check the services running in the namespace where you installed Litmus:
Expected Outputkubectl get svc -n litmus
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGElitmusportal-frontend-service NodePort 10.100.105.154 <none> 9091:30229/TCP 7m14slitmusportal-server-service NodePort 10.100.150.175 <none> 9002:30479/TCP,9003:31949/TCP 7m8smongo-service ClusterIP 10.100.226.179 <none> 27017/TCP 7m6s
Account Configuration#
Verify Successful Registration of the Self Agent postOnce the project is created, the cluster is automatically registered as a chaos target via installation of ChaosAgents. This is represented as Self-Agent in ChaosCenter.
kubectl get pods -n litmus
NAME READY STATUS RESTARTS AGEchaos-exporter-547b59d887-4dm58 1/1 Running 0 5m27schaos-operator-ce-84ddc8f5d7-l8c6d 1/1 Running 0 5m27sevent-tracker-5bc478cbd7-xlflb 1/1 Running 0 5m28slitmusportal-frontend-97c8bf86b-mx89w 1/1 Running 0 15mlitmusportal-server-5cfbfc88cc-m6c5j 2/2 Running 1 15mmongo-0 1/1 Running 0 15msubscriber-958948965-qbx29 1/1 Running 0 5m30sworkflow-controller-78fc7b6c6-w82m7 1/1 Running 0 5m32s
#
Resource Requirements of Control-plane componentsThe Resource requests provided here have been estimated using data gathered manually through different methods -
- Using command
kubectl top
- Recommendations from Vertical-Pod-Autoscaler
- Recommendations by a great utility Goldilocks.
These resources are getting monitored continuously and the information below will be updated as the metrics changes.
note
The metrics given below shows resources consumed when ChaosCenter is used at medium scale.The resources may need to be increased when used at higher scale.
Pod | Container | CPU | Memory |
---|---|---|---|
litmusportal-frontend | litmusportal-frontend | 25m | 300M |
litmusportal-server | auth-server | 25m | 150M |
litmusportal-server | graphql-server | 25m | 350M |
mongodb | mongodb | 25m | 350M |