Kubernetes: Is there a way to update "nodeAffinity" and "schedulerName" in Pod configuration via the Kubernetes API when the Pod is in Pending state?

9/30/2017

I have some specific pod-scheduling needs. So I am writing my own custom scheduler.

However, I wonder if the custom scheduler can simply update the pod configuration, specifically the "nodeAffinity" and "schedulerName" fields, so the scheduling can be delegated back to kube-scheduler.

This way, the custom scheduler need not emulate the entire kube-scheduler, and can make use of any updates in kube-scheduler in the future versions.

This is why I asked if a Job or Pod running in the cluster can update the nodeAffinity and schedulerName fields of the pod configuration - say via the Kubernetes API or any other way?

-- conundrum
kubernetes

0 Answers