Difference between revisions of "Spec.affinity"
Jump to navigation
Jump to search
(Removed redirect to Affinity:) Tag: Removed redirect |
|||
(One intermediate revision by the same user not shown) | |||
Line 10: | Line 10: | ||
affinity: | affinity: | ||
− | podAntiAffinity: | + | [[podAntiAffinity]]: |
[[requiredDuringSchedulingIgnoredDuringExecution]]: | [[requiredDuringSchedulingIgnoredDuringExecution]]: | ||
- [[labelSelector]]: | - [[labelSelector]]: | ||
Line 27: | Line 27: | ||
== See also == | == See also == | ||
* {{affinity}} | * {{affinity}} | ||
− | |||
[[Category:K8s]] | [[Category:K8s]] |
Latest revision as of 07:18, 25 July 2024
spec.affinity spec.affinity.nodeAffinity spec.affinity.podAntiAffinity
spec: affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: node_group operator: In values: - arm_db - key: topology.kubernetes.io/zone operator: In values: - us-east-1a
affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: app operator: In values: - YOURAPPNAME topologyKey: "kubernetes.io/hostname"
- Kubernetes pod affinity and anti affinity
0/2 nodes are available: 1 Too many pods, 1 nodes(s) didn't match Pod's node affinity/selector
See also[edit]
Advertising: