Reputation: 4890
In an hybrid EKS cluster (using both EC2 nodes and Fargate "serverless" hosting), how to prevent Daemonsets from attempting to schedule pods on Fargate virtual nodes?
For context, I'm using Fargate to host cluster-autoscaler (to avoid the potential deadlock when rolling EC2 nodes for OS updates), and Fargate nodes do not support Daemonset pods. Is there some way to automatically taint the Fargate nodes, or otherwise configure the Daemonset controller (which is presumably managed as part of the EKS control plane) so that it doesn't futilely schedule pods to existing Fargate nodes? Alternatively, is there an unconvoluted way to give all Daemonsets an anti-affinity for fargate-labelled nodes, without needing to fork the third-party Helm charts where some of these Daemonsets are defined? Or should I code a new controller from scratch?
Upvotes: 0
Views: 622
Reputation: 15480
...how to prevent Daemonsets from attempting to schedule pods on Fargate
You can add nodeAffinity
to your daemonset affinity
section to skip Fargate node:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: eks.amazonaws.com/compute-type
operator: NotIn
values: ["fargate"]
Upvotes: 0