Answers: <p>i guess you mean a Deployment because service do not have any pods, and yes, you can use node affinity on a Deployment. you can find it here <a href="https://www.howtoforge.com/use-node-affinity-in-kubernetes/" rel="nofollow noreferrer">https://www.howtoforge.com/use-node-affinity-in-kubernetes/</a></p>
  
Answers: CC BY-SA 4.0
Answers: 2021-06-30T16:42:54.537Z
Answers: 2021-06-30T16:42:54.537Z
Answers: danny kaplunski
Body: <p><a href="https://www.eksworkshop.com/beginner/140_assigning_pods/affinity/" rel="nofollow noreferrer">https://www.eksworkshop.com/beginner/140_assigning_pods/affinity/</a></p>
  <p>Links like above usually show node affinity for &quot;kind: Pod&quot;.</p>
  <p>Isn't it possible to use node affinity for &quot;kind: Service&quot; whereby all pods in a service will have a node affinity?</p>
  
Tags: <kubernetes><amazon-web-services><eks>
Title: EKS NodeAffinity for Services
UserDisplayName: Biju
ThreadText: # EKS NodeAffinity for Services
  
  (Asked by: username_0 on 2021-06-29)
  
  <https://www.eksworkshop.com/beginner/140_assigning_pods/affinity/>
  
  Links like above usually show node affinity for "kind: Pod".
  
  Isn't it possible to use node affinity for "kind: Service" whereby all pods in a service will have a node affinity?
  
  **Tags:** kubernetes, amazon-web-services, eks
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-06-30. Score: 1
  
  i guess you mean a Deployment because service do not have any pods, and yes, you can use node affinity on a Deployment. you can find it here <https://www.howtoforge.com/use-node-affinity-in-kubernetes/>
  
  
  ---
  
  