Reputation: 20370
I'd like to setup a Kubernetes cluster with two node groups: one node group reserved for a specific Deployment
, and a second default nodegroup for everything else. I'd like default pod scheduling to not use the dedicated node group and only use the default group.
One strategy is:
Taint the dedicated NodeGroup as NoSchedule, so it is not used by default.
The one dedicated Deployment
uses a toleration
no ignore/reverse the NoSchedule
taint and uses a nodeAffinity
of requiredDuringSchedulingIgnoredDuringExecution
to require the dedicated nodegroup.
Would this work? Would this be ideal? Is there a better strategy?
Upvotes: 2
Views: 485
Reputation: 17615
You are spot on. Your approach is correct. It should work
Alternatively you can add default node label to all nodes in default node group. And dedicated node label to dedicated node group. Define node affinity and anti affinity to get the pods scheduled to appropriate nodes
Upvotes: 2