EBS loss by ID
EBS (Elastic Block Store) loss by ID disrupts the state of EBS volume by detaching it from the node (or EC2) instance using volume ID for a certain duration. In case of EBS persistent volumes, the volumes can self-attach, and the re-attachment step can be skipped.
EBS loss by ID tests the deployment sanity (replica availability and uninterrupted service) and recovery workflows of the application pod.
- Kubernetes version 1.17 or later is required to execute this fault.
- Appropriate AWS access to attach or detach an EBS volume for the instance.
- The EBS volume should be attached to the instance.
- The Kubernetes secret should have AWS access configuration (key) in the
CHAOS_NAMESPACE. Below is a sample secret file:
# Add the cloud AWS credentials respectively
aws_access_key_id = XXXXXXXXXXXXXXXXXXX
aws_secret_access_key = XXXXXXXXXXXXXXX
- We recommend that you use the same secret name, that is,
cloud-secret. Otherwise, you will need to update the
AWS_SHARED_CREDENTIALS_FILEenvironment variable in the fault template and you won't be able to use the default health check probes.
- Refer to AWS named profile for chaos to use a different profile for AWS faults and superset permission or policy to execute all AWS faults.
- Go to the common tunables and AWS-specific tunables to tune the common tunables for all faults and AWS-specific tunables.
Below is an example AWS policy to execute the fault.
|EBS_VOLUME_ID||Comma-separated list of volume IDs subject to EBS detach.|| For example, |
|REGION||Region name for the target volumes.|| For example, |
|TOTAL_CHAOS_DURATION||Duration that you specify, through which chaos is injected into the target resource (in seconds).||Default: 30 s.|
|CHAOS_INTERVAL||Time interval between the attachment and detachment of the volumes (in seconds).||Default: 30 s.|
|SEQUENCE||Sequence of chaos execution for multiple volumes.||Default: parallel. Supports serial sequence as well.|
|RAMP_TIME||Period to wait before and after injecting chaos (in seconds).||For example, 30 s.|
Detach volumes by ID
Comma-separated list of volume IDs subject to EBS detach. Tune it by using the
EBS_VOLUME_ID environment variable.
The following YAML snippet illustrates the use of this environment variable:
# contains EBS volume ID
- name: ebs-loss-by-id
# ID of the EBS volume
- name: EBS_VOLUME_ID
# region for the EBS volume
- name: REGION
- name: TOTAL_CHAOS_DURATION