Difference between revisions of "Spec.NodeSelector"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
{{lc}} | {{lc}} | ||
+ | * https://www.eksworkshop.com/beginner/140_assigning_pods/node_selector/ | ||
* https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes/#create-a-pod-that-gets-scheduled-to-your-chosen-node | * https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes/#create-a-pod-that-gets-scheduled-to-your-chosen-node |
Revision as of 15:44, 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
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: