PodChaos Experiment

    PodChaos allows you to simulate pod faults or specific container issue, specifically pod failure, pod kill and container kill. pod failure can be used to simulate a situation where a pod is down. In this case, the pod is unavailable for a long time.

    • Pod Kill action kills the specified pod (ReplicaSet or something similar might be needed to ensure the pod will be restarted).

    • Container Kill action kills the specified container in the target pods.

    Below is a sample configuration file:

    For a detailed description of each field in the configuration template, see Fields description.

    Below is a sample pod-kill configuration file:

    For a detailed description of each field in the configuration template, see .

    For a detailed description of each field in the configuration template, see Fields description.

    • action defines the specific chaos action for the Pod. In this case, it is a Pod failure.
    • mode defines the mode to run chaos action. Supported mode: one / all / fixed / / random-max-percent.
    • selector specifies the target pods for chaos injections. For more details, see .
    • containerName defines the target container name, it is needed by container kill action.
    • gracePeriod defines the duration in seconds before the pod should be deleted. It is used in pod-kill action, and its value must be non-negative integer. The default value is zero that indicates delete immediately.
    • duration defines the duration for each chaos experiment. The default value is 30s, which indicates that pod failure will last for 30 seconds.