> 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-testing/chaos-faults/kubernetes.md). Agents can also search and read this documentation through its [MCP server](https://developer.harness.io/~gitbook/mcp).

# Kubernetes

Chaos faults for Kubernetes pods and nodes, the environments they support, and the setup they need.

Kubernetes faults act on the pods, containers, and nodes of a cluster through the Kubernetes API or a helper pod on the target node. The faults run on a Kubernetes chaos infrastructure installed in the cluster.

***

## Before you begin

* **Chaos infrastructure:** Install a Kubernetes chaos infrastructure in the target cluster. Go to [Kubernetes infrastructure](https://developer.harness.io/resilience-testing/chaos-testing/infrastructure/kubernetes.md) to install one.
* **Permissions:** The chaos service account needs RBAC permissions for each fault you run, and some faults need privileged helper pods. Go to [Kubernetes fault permissions](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/kubernetes/permissions.md) to review them.
* **GKE Autopilot:** Autopilot clusters need an allowlist before faults can run. Go to [Chaos on GKE Autopilot](https://developer.harness.io/resilience-testing/chaos-testing/gke-autopilot.md) to set it up.

***

## Supported environments

Kubernetes faults support Kubernetes 1.21 or later on the following environments, with the Docker, containerd, and CRI-O container runtimes. A fault page states any environment it does not support.

| Environment                              | Support status                                                                                                                                                 |
| ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Amazon EKS                               | Supported                                                                                                                                                      |
| Azure AKS                                | Supported                                                                                                                                                      |
| Google GKE                               | Supported                                                                                                                                                      |
| GKE Autopilot                            | Supported for allowlisted faults. Go to [Chaos on GKE Autopilot](https://developer.harness.io/resilience-testing/chaos-testing/gke-autopilot.md) for the list. |
| Red Hat OpenShift                        | Supported                                                                                                                                                      |
| Rancher                                  | Supported                                                                                                                                                      |
| VMware Tanzu                             | Supported                                                                                                                                                      |
| Self-managed Kubernetes (CNCF-certified) | Supported                                                                                                                                                      |

### Install scope

A Kubernetes chaos infrastructure is installed either cluster-wide or scoped to namespaces. The scope decides which faults you can run.

| Scope            | What the chaos service account can reach                                 | Faults you can run                       |
| ---------------- | ------------------------------------------------------------------------ | ---------------------------------------- |
| Cluster-wide     | Workloads in every namespace, and cluster-scoped resources such as nodes | All Kubernetes faults                    |
| Namespace-scoped | Workloads in the namespaces where its role is bound                      | Pod faults, except Pod network partition |

Go to [Kubernetes fault permissions](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/kubernetes/permissions.md#faults-that-need-more-permissions) to review which faults need a cluster-wide install.

### VMware Tanzu

Kubernetes faults run on Tanzu Kubernetes Grid Integrated clusters the same way as on any other conformant cluster. The chaos infrastructure needs outbound HTTPS (port 443) to Harness, and outbound access to any endpoint your probes check. Pod faults that only call the Kubernetes API, such as Pod delete, need no container privileges. Network, stress, HTTP, DNS, and IO faults need privileged helper pods; go to [Container privileges](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/kubernetes/permissions.md#container-privileges) to review which.

***

## Faults

| Group                                                                                                 | What the faults target                       |
| ----------------------------------------------------------------------------------------------------- | -------------------------------------------- |
| [Pod](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/kubernetes/pod.md)   | Pods and containers of a workload            |
| [Node](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/kubernetes/node.md) | Cluster nodes and the pods scheduled on them |

***

## Troubleshooting

<details>

<summary>A Kubernetes fault fails with a forbidden error</summary>

The chaos service account is missing a permission the fault needs, which is common on a namespace-scoped install. Compare the role with the fault's **Permissions** section, then go to [Kubernetes fault permissions](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/kubernetes/permissions.md) to add the missing rules.

</details>

<details>

<summary>A Kubernetes fault does not run on GKE Autopilot</summary>

Autopilot blocks privileged workloads unless they are allowlisted, and only some faults are allowlisted. Check that the Harness allowlist is applied and that the fault is on the supported list. Go to [Chaos on GKE Autopilot](https://developer.harness.io/resilience-testing/chaos-testing/gke-autopilot.md) to set it up.

</details>

***

## Next steps

* Go to [Pod](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/kubernetes/pod.md) or [Node](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/kubernetes/node.md) to choose a fault.
* Go to [Common tunables](https://developer.harness.io/resilience-testing/chaos-testing/chaos-faults/common-tunables.md) to configure the settings every fault shares.

{% @harness-feedback/feedback %}
