---
id: pod-delete
title: Pod Delete Experiment Details
sidebar_label: Pod Delete
original_id: pod-delete
---
---
## Experiment Metadata
| Variables |
Description |
Specify In ChaosEngine |
Notes |
| TOTAL_CHAOS_DURATION |
The time duration for chaos insertion (in sec) |
Optional |
Defaults to 15s, NOTE: Overall run duration of the experiment may exceed the TOTAL_CHAOS_DURATION by a few min |
| CHAOS_INTERVAL |
Time interval b/w two successive pod failures (in sec) |
Optional |
Defaults to 5s |
| LIB |
The chaos lib used to inject the chaos |
Optional |
Defaults to `litmus`. Supported: `litmus`, `powerfulseal`. In case of powerfulseal use the powerfulseal experiment CR. |
| FORCE |
Application Pod deletion mode. `False` indicates graceful deletion with default termination period of 30s. 'True' indicates an immediate forceful deletion with 0s grace period |
Optional |
Default to `true`, With `terminationGracePeriodSeconds=0` |
| TARGET_POD |
Name of the application pod subjected to pod delete chaos |
Optional |
If not provided it will select from the appLabel provided |
| PODS_AFFECTED_PERC |
The Percentage of total pods to target |
Optional |
Defaults to 0% (corresponds to 1 replica) |
| RAMP_TIME |
Period to wait before and after injection of chaos in sec |
Optional |
|
| SEQUENCE |
It defines sequence of chaos execution for multiple target pods |
Optional |
Default value: parallel. Supported: serial, parallel |
| INSTANCE_ID |
A user-defined string that holds metadata/info about current run/instance of chaos. Ex: 04-05-2020-9-00. This string is appended as suffix in the chaosresult CR name. |
Optional |
Ensure that the overall length of the chaosresult CR is still < 64 characters |
#### Sample ChaosEngine Manifest
[embedmd]: # "https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/generic/pod-delete/engine.yaml yaml"
```yaml
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: nginx-chaos
namespace: default
spec:
appinfo:
appns: "default"
applabel: "app=nginx"
appkind: "deployment"
# It can be true/false
annotationCheck: "true"
# It can be active/stop
engineState: "active"
#ex. values: ns1:name=percona,ns2:run=nginx
auxiliaryAppInfo: ""
chaosServiceAccount: pod-delete-sa
monitoring: false
# It can be delete/retain
jobCleanUpPolicy: "delete"
experiments:
- name: pod-delete
spec:
components:
env:
# set chaos duration (in sec) as desired
- name: TOTAL_CHAOS_DURATION
value: "30"
# set chaos interval (in sec) as desired
- name: CHAOS_INTERVAL
value: "10"
# pod failures without '--force' & default terminationGracePeriodSeconds
- name: FORCE
value: "false"
```
### Create the ChaosEngine Resource
- Create the ChaosEngine manifest prepared in the previous step to trigger the Chaos.
`kubectl apply -f chaosengine.yml`
- If the chaos experiment is not executed, refer to the [troubleshooting](https://docs.litmuschaos.io/docs/faq-troubleshooting/)
section to identify the root cause and fix the issues.
### Watch Chaos progress
- View pod terminations & recovery by setting up a watch on the pods in the application namespace
`watch -n 1 kubectl get pods -n