node-taint
Adds a taint to target nodes. Pods without a matching toleration will be evicted (NoExecute) or not scheduled (NoSchedule).
Target kind: Node
Implementation: Kubernetes API (no daemon)
Rollback: Yes — removes the taint from the node
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
key | string | Yes | — | Taint key |
value | string | No | "" | Taint value |
effect | string | Yes | — | NoSchedule, NoExecute, or PreferNoSchedule |
Example
apiVersion: chaos.chaosplane.io/v1alpha1
kind: ChaosExperiment
metadata:
name: node-taint-example
namespace: chaosplane
spec:
target:
kind: Node
names:
- worker-node-1
action:
type: node-taint
parameters:
key: "chaos.chaosplane.io/test"
value: "true"
effect: "NoSchedule"
duration: 2m
rollback:
enabled: true
Rollback behavior
Removes the taint by filtering it out of node.Spec.Taints and updating the node via the Kubernetes API. Only the taint with the matching key and effect is removed.
Implementation notes
Uses the Kubernetes API directly. The operation is idempotent: if a taint with the same key and effect already exists, it's skipped. Valid effects are NoSchedule, NoExecute, and PreferNoSchedule. Both key and effect are required and validated before execution.