OpenShift Chaos Infrastructure
This topic describes OpenShift Chaos Infrastructure and its installation.
Harness CE supports the installation of OpenShift infrastructure to execute chaos experiments. Follow the steps below to install the OpenShift infrastructure.
Step 1: Create / identify target namespace and install the service accounts
Create or identify the target chaos namespace in which you will deploy the chaos infrastructure. You will use the hce namespace in this case.
kubectl create ns hceYou can create the service account in the cluster mode or the namespace mode.
To install in the cluster mode, create the service accounts using the cluster-mode-sa.yaml file. You can download the file and apply it.
To install in the namespace mode, create the service accounts using the namespace-mode-sa.yaml file. You can download the file and apply it.
If you have a different namespace, replace the namespace with <your-namespace> in the manifest.
kubectl create cluster-mode-sa.yaml -n hceOutput
$> kubectl apply -f cluster-mdoe-sa.yaml -n hce
serviceaccount/litmus-admin created
serviceaccount/hce created
serviceaccount/argo-chaos created
serviceaccount/argo created
serviceaccount/litmus-cluster-scope createdStep 2: Create Litmus Security Context Constraint (SCC) and authenticate it with the service account
To create the litmus SCC,
Copy the contents of the litmus SCC manifest to
litmus-scc.yamlfile.Apply this manifest to your chaos infrastructure.
Output
Authenticate all
hceservice accounts withlitmus-scc:
In this case, the exact command is:
Output
Step 3: Get manifest to install chaos infrastructure
After connecting to a chaos infrastructure, select the installation mode (cluster scope or namespace scope).

Step 4: Verify the installation
Verify if all the pods are in Running state (optional).
Ensure that the state of the chaos infrastructure is CONNECTED.

Step 5: Run chaos experiments
To run Kubernetes experiments, you need to tune the parameters associated with the fault. You can update or add the below mentioned environment variables while tuning the faults.
Last updated
Was this helpful?