Remediation

Robusta includes actions that modify Kubernetes resources in your cluster. Most of them need a runner.rbac flag, see Read-Only Service Account.

Warning

alert_handling_job is deprecated and no longer supported. It logs an error and returns an error without creating a Job.

Alert handling job

Playbook Action: alert_handling_job

Deprecated. This action is no longer supported and returns an error.

Add this to your Robusta configuration (Helm values.yaml):

customPlaybooks:
- actions:
  - alert_handling_job: {}
  triggers:
  - on_pod_create: {}

The above is an example. Try customizing the trigger and parameters.

No action parameters

This action can be manually triggered using the Robusta CLI:

robusta playbooks trigger alert_handling_job 

Delete pod

Playbook Action: delete_pod

Deletes a pod

Add this to your Robusta configuration (Helm values.yaml):

customPlaybooks:
- actions:
  - delete_pod: {}
  triggers:
  - on_prometheus_alert: {}

The above is an example. Try customizing the trigger and parameters.

No action parameters

This action can be manually triggered using the Robusta CLI:

robusta playbooks trigger delete_pod name=POD_NAME namespace=POD_NAMESPACE 

Delete alert pod

Playbook Action: delete_alert_pod

Deletes the pod associated with a Prometheus alert.

Supports an optional rate limit, scoped by an alert label value.

Add this to your Robusta configuration (Helm values.yaml):

customPlaybooks:
- actions:
  - delete_alert_pod: {}
  triggers:
  - on_prometheus_alert: {}

The above is an example. Try customizing the trigger and parameters.

optional:
rate_limit (int)

Optional rate limit (seconds). If set, the action will only run once per period for the same alert label value.

rate_limit_field (str)

Alert label name whose value is used to build the rate limit key.

Delete job

Playbook Action: delete_job

Delete the job from the cluster

Add this to your Robusta configuration (Helm values.yaml):

customPlaybooks:
- actions:
  - delete_job: {}
  triggers:
  - on_job_failure: {}

The above is an example. Try customizing the trigger and parameters.

No action parameters

This action can be manually triggered using the Robusta CLI:

robusta playbooks trigger delete_job name=JOB_NAME namespace=JOB_NAMESPACE 

Alert on hpa reached limit

Playbook Action: alert_on_hpa_reached_limit

Notify when the HPA reaches its maximum replicas and suggest a new maximum.

Add this to your Robusta configuration (Helm values.yaml):

customPlaybooks:
- actions:
  - alert_on_hpa_reached_limit: {}
  triggers:
  - on_horizontalpodautoscaler_update: {}

The above is an example. Try customizing the trigger and parameters.

optional:
increase_pct (int) = 20

Increase the HPA max_replicas by this percentage.

Warning

rollout_restart is deprecated and no longer supported. It logs an error and returns an error without restarting the workload.

Rollout restart

Playbook Action: rollout_restart

Deprecated. This action is no longer supported and returns an error.

Add this to your Robusta configuration (Helm values.yaml):

customPlaybooks:
- actions:
  - rollout_restart: {}
  triggers:
  - on_pod_create: {}

The above is an example. Try customizing the trigger and parameters.

No action parameters

This action can be manually triggered using the Robusta CLI:

robusta playbooks trigger rollout_restart 

Node

Cordon

Playbook Action: cordon

Cordon, Taints a node as unschedulable.

Add this to your Robusta configuration (Helm values.yaml):

customPlaybooks:
- actions:
  - cordon: {}
  triggers:
  - on_node_create: {}

The above is an example. Try customizing the trigger and parameters.

No action parameters

This action can be manually triggered using the Robusta CLI:

robusta playbooks trigger cordon name=NODE_NAME 

Uncordon

Playbook Action: uncordon

Unordon, Taints a node as schedulable.

Add this to your Robusta configuration (Helm values.yaml):

customPlaybooks:
- actions:
  - uncordon: {}
  triggers:
  - on_node_create: {}

The above is an example. Try customizing the trigger and parameters.

No action parameters

This action can be manually triggered using the Robusta CLI:

robusta playbooks trigger uncordon name=NODE_NAME 

Drain

Playbook Action: drain

Drain, taints a node as unschedulable, and evicts all pods from the node. DaemonSets pods are skipped, as they tolerant unschedulable nodes by default.

Add this to your Robusta configuration (Helm values.yaml):

customPlaybooks:
- actions:
  - drain: {}
  triggers:
  - on_node_create: {}

The above is an example. Try customizing the trigger and parameters.

No action parameters

This action can be manually triggered using the Robusta CLI:

robusta playbooks trigger drain name=NODE_NAME 

Kubectl

Warning

kubectl_command is deprecated and no longer supported. It logs an error and returns an error without running the command.

Kubectl command

Playbook Action: kubectl_command

Deprecated. This action is no longer supported and returns an error.

Add this to your Robusta configuration (Helm values.yaml):

customPlaybooks:
- actions:
  - kubectl_command: {}
  triggers:
  - on_pod_create: {}

The above is an example. Try customizing the trigger and parameters.

No action parameters

This action can be manually triggered using the Robusta CLI:

robusta playbooks trigger kubectl_command