> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/resilience-testing/chaos-engineering/faults/custom-faults/create-custom-faults.md).

# Create Custom Faults

This approach allows you to build a custom fault from the ground up with complete control over its configuration and behavior.

## Overview <a href="#overview" id="overview"></a>

Creating custom faults from scratch gives you maximum flexibility to implement fault injection logic tailored to your specific infrastructure and application requirements. This method is ideal when existing fault types don't meet your needs or when you need precise control over fault behavior.

## When to Use <a href="#when-to-use" id="when-to-use"></a>

Choose this approach when:

* You have specific requirements that don't match existing fault types
* You need complete control over fault behavior and execution
* Your infrastructure has unique components requiring specialized fault injection
* You want to implement complex failure scenarios not covered by standard faults
* You need to integrate with custom monitoring or recovery systems

### Step 1: Getting Started <a href="#step-1-getting-started" id="step-1-getting-started"></a>

1. Navigate to **Project Settings** for your project and click on **Chaos Faults**.

   ![Project Settings](/files/92xi0pd7YC6OKc6gklUV)
2. Click **Custom Faults** on the top-right, then click **New Fault** to create a new fault from scratch.

   ![New Fault](/files/NK89ojYQ3FNBL6lnXCEj)

{% hint style="info" %}
**ALTERNATIVE OPTION**

You can also choose **Start with a Template** to begin with a pre-configured fault template that you can customize for your needs. Learn more in the [Custom Fault Templates guide](/resilience-testing/chaos-engineering/faults/custom-faults/custom-fault-templates.md).
{% endhint %}

### Step 2: Define Fault Basics <a href="#step-2-define-fault-basics" id="step-2-define-fault-basics"></a>

Configure these basic properties of your custom fault:

* **Name**: Provide a descriptive name for your fault (required field)
* **Description (optional)**: Add detailed description of what the fault does
* **Tags (optional)**: Add tags for better organization and searchability
* **Infrastructure type**: Select the target infrastructure (e.g., Kubernetes)
* **Category**: Assign the fault to an appropriate category (e.g., Kubernetes)
* **Permission Level**: Set the required permission level (e.g., Basic)
* **Permissions Required**: Define specific permissions needed for fault execution

![Custom Fault Basics](/files/az1tE0rfxOlsq1x1QFqS)

### Step 3: Configure Fault Properties <a href="#step-3-configure-fault-properties" id="step-3-configure-fault-properties"></a>

Configure the execution properties and parameters for your custom fault, then click **Create Fault**.

**Basic Configuration**

* **Lib Image**: Container image containing your fault logic
* **Command**: Main command to execute
* **Arguments**: Command-line arguments for fault execution
* **Parameters**: Custom parameters that users can configure

**Advanced Configuration** Additional options are available for volume dependencies, security settings, and container capabilities. Configure these based on your specific fault requirements.

![Custom Fault Properties](/files/Keu7x9DmtHWwC4SvRgT0)

### Step 4: Add to Experiments <a href="#step-4-add-to-experiments" id="step-4-add-to-experiments"></a>

Once your custom fault is created, navigate to **Chaos Experiments** and add your custom fault to a new or existing experiment. Your fault will be available under the **Custom Faults**.

![Add to Experiments](/files/csX9MWbPOehHX9hXgVkY)

## Next Steps <a href="#next-steps" id="next-steps"></a>

* [Create and run chaos experiments](/resilience-testing/chaos-engineering/new-to-chaos-engineering/quickstart.md)
* [Learn about chaos experiment best practices](/resilience-testing/chaos-engineering/chaos-experiments/index.md)
