Skip to main content

pod-kill

Deletes one or more pods. Kubernetes reschedules them immediately via the owning Deployment or ReplicaSet.

Target kind: Pod
Implementation: Kubernetes API (CoreV1().Pods().Delete())
Rollback: None (Kubernetes handles pod restart)

Parameters

NameTypeRequiredDefaultDescription
gracePeriodSecondsstringNo"0"Grace period before SIGKILL is sent

Example

apiVersion: chaos.chaosplane.io/v1alpha1
kind: ChaosExperiment
metadata:
name: pod-kill-example
namespace: default
spec:
target:
kind: Pod
namespace: default
labelSelector:
matchLabels:
app: my-app
action:
type: pod-kill
parameters:
gracePeriodSeconds: "0"
duration: 10s
rollback:
enabled: false

Rollback behavior

No rollback is performed. The pod is deleted and Kubernetes restarts it automatically. If you need the pod to be recreated before the experiment ends, use steady-state after probes with a recoveryTimeout.

Implementation notes

Uses the Kubernetes API directly from the operator. No daemon involvement. The operator calls CoreV1().Pods(namespace).Delete() with the specified grace period for each resolved target pod.

Static pods (mirror pods) are not filtered — target them by name or label selector carefully.