Difference between revisions of "Kubernetes Node Affinity"
Jump to navigation
Jump to search
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | * https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/ | ||
+ | <code>[[kubectl describe pv]]</code> | ||
+ | |||
+ | |||
+ | apiVersion: v1 | ||
+ | kind: Pod | ||
+ | metadata: | ||
+ | name: nginx | ||
+ | spec: | ||
+ | [[affinity]]: | ||
+ | [[nodeAffinity]]: | ||
+ | [[requiredDuringSchedulingIgnoredDuringExecution]]: | ||
+ | nodeSelectorTerms: | ||
+ | - matchExpressions: | ||
+ | - key: disktype | ||
+ | operator: In | ||
+ | values: | ||
+ | - ssd | ||
+ | containers: | ||
+ | - name: nginx | ||
+ | image: nginx | ||
+ | imagePullPolicy: IfNotPresent | ||
− | |||
== Activities == | == Activities == | ||
Line 9: | Line 30: | ||
* [[Kubernetes pod affinity and anti affinity]] | * [[Kubernetes pod affinity and anti affinity]] | ||
* [[NodeRestriction admission plugin]] | * [[NodeRestriction admission plugin]] | ||
+ | * [[eks.amazonaws.com]] | ||
== See also == | == See also == |
Latest revision as of 14:50, 22 May 2024
apiVersion: v1 kind: Pod metadata: name: nginx spec: affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: disktype operator: In values: - ssd containers: - name: nginx image: nginx imagePullPolicy: IfNotPresent
Activities[edit]
Related[edit]
- Kubernetes taints and tolerations:
kubectl taint
- Kubernetes pod affinity and anti affinity
- NodeRestriction admission plugin
- eks.amazonaws.com
See also[edit]
- Kubernetes taints:
kubectl taint
- Kubernetes pod affinity and anti affinity, Kubernetes Node Affinity,
default-scheduler, affinity:, NodeAffinity, spec.affinity.podAntiAffinity
- Kubernetes nodes,
node.kubernetes.io
K8s Node controller (node-controller),MemoryPressure, DiskPressure, NodeHasDiskPressure, events, NodeNotReady
, Node-pressure Eviction, RemovingNode, ProviderID,kubectl node-shell, kubectl describe nodes
Advertising: