Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Prevent node pool to delete node that is running a job

Hello,

I have a job running in GKE and this job may need run for a month.
Is there a way to guarantee that the node where the pod is allocated is not deleted during the resize of the node pool? We need this job to run only one time without restarting by being allocated to other node.

Best regards

Solved Solved
0 1 833
1 ACCEPTED SOLUTION

Assuming you are using the cluster autoscaler, if you want to ensure that the node(s) running your job(s) are now downsized, then you can add the

"cluster-autoscaler.kubernetes.io/safe-to-evict": "false"

to your Job specs.  See this link for more info.

Also, if you are using release channels and have automatic upgrades enabled, you may want to consider using maintenance exclusions as well.

 

View solution in original post

1 REPLY 1

Assuming you are using the cluster autoscaler, if you want to ensure that the node(s) running your job(s) are now downsized, then you can add the

"cluster-autoscaler.kubernetes.io/safe-to-evict": "false"

to your Job specs.  See this link for more info.

Also, if you are using release channels and have automatic upgrades enabled, you may want to consider using maintenance exclusions as well.

 

Top Labels in this Space
Top Solution Authors