spark-operator
spark-operator copied to clipboard
node affinity doesnt work
This functional requirement is very important. For example, if there are CPU machines and GPU machines in the node, node scheduling must be required!!
In my previous experience, that may be caused by mutating-admission-webhook missing.
https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/blob/master/docs/quick-start-guide.md#about-the-mutating-admission-webhook
I use nodeSelector
and it works for me, in case you want to give it a try.
I had the same issue and was able to get it working using a pod template file without the need to enable the webhook https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/issues/1176#issuecomment-1179287656
I had the same issue and was able to get it working using a pod template file without the need to enable the webhook #1176 (comment)
can you give a example of the pod template ?
My pod template has a lot of custom settings for my infrastructure. However, any valid pod yaml file should work. The spark/k8s docs have more details https://spark.apache.org/docs/latest/running-on-kubernetes.html#pod-template https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/pod-templates.html
--conf spark.kubernetes.node.selector.kubernetes.io/hostname=sz-exa-cpu-10
works for me.
Ref: https://spark.apache.org/docs/latest/running-on-kubernetes.html