EC2 process kill fault kills the target processes running on an EC2 instance.
- It checks the performance of the application/process running on the EC2 instance(s).
View fault usage
- Kubernetes > 1.16
- SSM agent is installed and running in the target EC2 instance.
- Create a Kubernetes secret that has the AWS Access Key ID and Secret Access Key credentials in the
CHAOS_NAMESPACE. Below is the sample secret file:
# Add the cloud AWS credentials respectively
aws_access_key_id = XXXXXXXXXXXXXXXXXXX
aws_secret_access_key = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
- If you change the secret name, ensure that you update the
experiment.ymlenvironment variable to derive the respective data from the secret. Also account for the path at which this secret is mounted as a file in the manifest ENV
You can pass the VM credentials as secrets or as a
ChaosEngine environment variable.
Here is an example AWS policy to execute the fault.
View policy for the fault
Refer to the superset permission/policy to execute all AWS faults.
- The EC2 instance should be in healthy state
- The target processes should exist in the VM.
|EC2_INSTANCE_ID||ID of the target EC2 instance.|| For example, |
|REGION||The AWS region ID where the EC2 instance has been created.|| For example, |
|PROCESS_IDS||Process IDs of the target processes provided as comma-separated values.||For example, 183,253,857.|
|TOTAL_CHAOS_DURATION||Duration that you specify, through which chaos is injected into the target resource (in seconds).||Defaults to 30s.|
|RAMP_TIME||Period to wait before and after injecting chaos (in seconds).||For example, 30|
Common fault tunables
Refer to the common attributes to tune the common tunables for all the faults.
It contains the target process IDs running on a particular EC2 instance.
You can tune it using the following example:
# Process kill running on EC2 instance
- name: ec2-process-kill
# List of Process IDs
- name: PROCESS_IDS
- name: EC2_INSTANCE_ID
- name: REGION