I am running a pod with large memory requirements in the EKS cluster. If the pod has an error state or OOMKilled error I would like the node to scale down somehow but capture the error. Is this possible? As of now, I have to manually delete the pod for the autoscaling group to trigger the node to be removed.
Asked
Active
Viewed 198 times
1
-
AFAIK it's not possible to scale down the node based on the kubernetes pod state. There is short [description](https://aws.amazon.com/premiumsupport/knowledge-center/eks-cluster-autoscaler-setup/) about that how the autoscaler works. So I would say you should rather fix the issue with error/oomkilled in your pod, unless it's made on purpose. How often do you have to kill this pod? Maybe you could use cronjob to kill this pod every some period of time? There is an [example](https://stackoverflow.com/questions/60697650) with such cronjob. – Jakub Nov 09 '20 at 12:20
1 Answers
1
You can use probes like liveliness and rediness probs
More details @ https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/

Amit Chudasama
- 39
- 4