For the complete documentation index, see llms.txt. This page is also available as Markdown.
BETAChaos EngineeringExperimentsKubernetes

Clean Up Experiment Resources

Remove the pods, configmaps, and secrets a chaos experiment run left behind in your cluster, from the run's timeline view.

This feature is in Beta and requires enablement. View all early access features.

When a chaos experiment run errors or stops partway, it can leave pods, configmaps, and secrets in the target cluster. Cleanup removes what that run left behind, so you do not have to find and delete the resources by hand.


Before you begin


Clean up a run

Perform the following steps:

  1. Go to Chaos Experiments, then select the Executions tab.

  2. Click the More icon on the run, then select View Execution.

  3. Click Cleanup in the action bar on the right edge of the timeline view.

  4. Click Cleanup at the top of the panel that opens.

The Cleanup panel for a run, with the Cleanup button at the top and a summary row of Status, Namespace, Resources found, Resources deleted, Failed deletions, and Last cleanup, all showing N/A before the first cleanup

The summary row and the Logs tab report the result of the most recent cleanup. If a cleanup fails, the panel shows the reason and the button changes to Force Cleanup.


Troubleshooting

Do network rules stay in place after a fault ends?

When a run errors or stops partway, it can leave Kubernetes resources in the target cluster. Cleanup deletes only the resources that run created: Deployments, Pods, Services, ConfigMaps, Secrets, Jobs, and CronJobs. It does not change node-level network rules. If network rules such as tc or iptables rules stay on a node after a fault ends, contact Harness Support. Cleanup is behind the feature flag CHAOS_RESOURCE_CLEANUP_ENABLED.

Cleanup failed: CHAOS_CLEANUP_TASK_NG task type not supported by delegate

The delegate that serves the infrastructure is older than the cleanup task, so nothing was deleted. Upgrade the delegate, then run the cleanup again.

Last updated

Was this helpful?