Closed Avi-Robusta closed 1 month ago
This is only for standard evictions due to node pressure (when you run kubectl get pods and you see the status as evicted)
This is not for:
kubectl taint nodes NODE_NAME key1=value1:NoExecute
kubectl proxy --port=8080 & POD_TO_EVICT="POD_NAME" curl -k -v -XPOST -H "Accept: application/json" -H "Content-Type: application/json" "http://localhost:8080/api/v1/namespaces/default/pods/${POD_TO_EVICT}/eviction" --data '{"kind":"Eviction","apiVersion":"policy/v1beta1","metadata": {"namespace": "default","name": "'"${POD_TO_EVICT}"'"}}'
Here is an example playbook
customPlaybooks: - triggers: - on_pod_evicted: {} actions: - create_finding: # title: "Pod $name in namespace $namespace was Evicted" aggregation_key: "PodEvictedTriggered"
Add Docs!!!
This is only for standard evictions due to node pressure (when you run kubectl get pods and you see the status as evicted)
This is not for:
Both have different status's and fields in the pod yaml so they are not in this trigger, they can be added in the future.
Here is an example playbook