Difference between revisions of "Spec.NodeSelector"
Jump to navigation
Jump to search
Line 38: | Line 38: | ||
imagePullPolicy: IfNotPresent | imagePullPolicy: IfNotPresent | ||
</pre> | </pre> | ||
+ | |||
+ | == [[Karpenter]] == | ||
+ | nodeSelector: | ||
+ | [[topology.kubernetes.io]]/zone: us-west-2a | ||
+ | [[karpenter.sh/capacity-type]]: spot | ||
+ | |||
Revision as of 15:47, 16 December 2022
apiVersion: v1 kind: Pod metadata: name: nginx labels: env: test spec: containers: - name: nginx image: nginx imagePullPolicy: IfNotPresent nodeSelector: disktype: ssd
apiVersion: v1 kind: Pod metadata: name: nginx spec: nodeName: foo-node # schedule pod to specific node containers: - name: nginx image: nginx imagePullPolicy: IfNotPresent
Contents
Karpenter
nodeSelector: topology.kubernetes.io/zone: us-west-2a karpenter.sh/capacity-type: spot
Activities
- CKA v1.21: Understand how to use Labels, Selector and Annotations
- CKA v1.18: Use label selectors to schedule Pods
- CKA v1.15: Understand how to use Labels, Selector and Annotations
- Use
NodeSelector
assign pod to specific node
Related terms
- Kubernetes scheduling
kubectl label
kubectl apply
nodeAffinity
- Kubernetes Pod Topology Spread Constraints
See also
- 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
- Pods:
kubectl apply
,kubectl [ pod get | top | delete | describe pods ]
,InitContainers, PodInitializing, CrashLoopBackOff, ImagePullPolicy:, NodeAffinity, NodeSelector, Terminated
Advertising: