Get Started
Connect an infrastructure, onboard your services, and run your first chaos experiment in Harness Resilience Testing.
This guide takes you from an empty project to your first chaos experiment. You connect an infrastructure, onboard the services running in it, and then run a fault against one of them.
Onboarding is what makes the rest of the flow fast. Once your services are onboarded, Harness already knows what your chaos targets are and each one already has health probes attached, so building an experiment is a matter of picking a target and a fault.
Before you begin
A Harness account with Resilience Testing access: Sign up if you do not have one, and confirm you can open the Resilience Testing module.
A target cluster: A Kubernetes cluster with
kubectlaccess. Go to Supported platforms to confirm your target is supported.Permissions on the target: Administrator access to the cluster so that you can install the Harness Delegate. Go to Cluster permissions to review the least-privilege alternative.
A Harness project: Create one, or ask your administrator to add you to an existing project.
Connect a chaos infrastructure
A chaos infrastructure is the connection between Harness and the cluster you want to test. On Kubernetes it runs through the Harness Delegate, so there is no separate chaos agent to install.
Install the Harness Delegate on the target cluster. Go to Install Delegate for the platform steps, and use the standard Delegate image rather than the minimal one.
Go to Resilience Testing → Project Settings → Resilience Testing Infrastructures.
Select the Kubernetes (Harness Infrastructure) tab, then select + New Infrastructure.
Select the environment the infrastructure belongs to, complete the infrastructure form, and select Save.
Go to Set up Kubernetes infrastructure for the full set of options, including the centralized delegate approach and least-privilege installs.
Onboard your services
Saving the infrastructure opens the Onboard a new resilience testing infrastructure wizard. Continuous discovery keeps inventing workloads in the cluster. This wizard is the one-time Resilience Testing flow that discovers, scans for risk, and onboards the workloads you select as services.
In Step 2, select the Service onboarding card, then select Go!.
Complete the Discovery stage so the agent invents the workload inventory.
Complete the Scanning stage so selected targets get a risk assessment.
In the Onboarding stage, deselect any workload you do not intend to test. Every discovered workload is selected by default, including system namespaces.
Select Onboard Services to create a service for each selected workload, then review the report summary.
Each service created in this bulk flow gets three health probes attached automatically, so you do not need to author validation before your first run.
Go to Automated service onboarding for a detailed walkthrough of each stage. For Linux VMs, Windows VMs, or AWS resources outside Kubernetes discovery, go to Custom Service Agent.
Review your onboarded services
Go to Resilience Testing → Insights → Services to confirm the services were created. Each row shows the service name, its type, and the infrastructure it came from.
Go to Services to understand what onboarding created and how to add a service manually.
Create your first chaos experiment
Start with Pod Delete. It has a small blast radius and is safe for most applications, which makes it a good first test.
Go to Resilience Testing → Chaos Experiments and select New Experiment.
Name the experiment, then select the infrastructure you connected.
Select Add Fault, then choose Kubernetes → Pod → Pod Delete.
Configure the fault:
Target: Select one of your onboarded services.
Chaos duration: Start with 30 seconds.
Force: Leave as
falseso that pods are deleted gracefully.
Add a probe if you want validation beyond the defaults. An HTTP probe against your application endpoint, expecting a
200response, is a good starting point.Save the experiment.
Go to Pod Delete to review every tunable the fault supports.
Run the experiment
Select Run to start the experiment. The execution view updates in real time, so you can watch the fault inject, the probes evaluate, and the target recover.
Analyze the results
When the run finishes, the results view reports the resilience score alongside the outcome of every probe and fault.
Read the results as follows:
Passed probes: Your application held up under the injected fault.
Failed probes: A weakness the experiment exposed. This is a useful result, not a broken experiment.
Resilience score: A weighted score across the probe and fault outcomes in the run. Go to Probes to understand how the score is calculated.
Troubleshooting
Next steps
You have connected an infrastructure, onboarded your services, and run your first experiment. Build on that with the following.
Services: Review and manage the services onboarding created.
Application maps: Group related services so that you can test a whole application.
Chaos faults: Browse the fault library for other failure scenarios.
Probes: Add your own validation on top of the default probes.
CI/CD integrations: Run chaos experiments automatically from your pipelines.
Last updated
Was this helpful?