Scheduling Pods on Windows nodes

To schedule Pods on nodes with specific properties, Kubernetes gives you a few possible options:

  • Using nodeName in the Pod specification. This is the simplest form of statically scheduling Pods on a given node and is generally not recommended.
  • Using nodeSelector in the pod specification. This gives you the possibility to schedule your pod only on nodes that have certain label values. We have been already using this approach in the previous section.
  • Node affinity and anti-affinity: These concepts expand the nodeSelector approach and provide a richer language of defining which nodes are preferred or avoided for your pod. You can read more about the possibilities in the official documentation: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity ...

Get Hands-On Kubernetes on Windows now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.