Difference between revisions of "Spec.NodeSelector"
Jump to navigation
Jump to search
Line 15: | Line 15: | ||
[[nodeSelector:]] | [[nodeSelector:]] | ||
[[disktype]]: ssd | [[disktype]]: ssd | ||
+ | |||
+ | <pre> | ||
+ | apiVersion: v1 | ||
+ | |||
+ | kind: Pod | ||
+ | |||
+ | metadata: | ||
+ | |||
+ | name: nginx | ||
+ | |||
+ | spec: | ||
+ | |||
+ | nodeName: foo-node # schedule pod to specific node | ||
+ | |||
+ | containers: | ||
+ | |||
+ | - name: nginx | ||
+ | |||
+ | image: nginx | ||
+ | |||
+ | imagePullPolicy: IfNotPresent | ||
+ | </pre> | ||
+ | |||
== Activities == | == Activities == |
Revision as of 10:40, 15 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
See also
kind:
[Pod | Ingress | ClusterConfiguration
|Config | ConfigMap | ServiceAccount | Deployment | List | Secret | Status ], spec: metadata: data:
- Kubernetes: distributions, tools, CKA, CKS, Kubernetes interfaces: CSI, CNI, installation, workloads, networking,
kubeadm
,Kubernetes API
, Kubernetes API Server,kubectl, kubeadm, kubelet, kube-proxy
, Cloud services: EKS, GKE, TKE, DKS, Helm, Kubernetes RBAC, Kubernetes deployments, Minikube, Rancher, OpenShift, Charmed Kubernetes, Ingress, Kubernetes scheduler, Kubernetes Finalizers, logging, Kubernetes operator, Orka,kind:
, Kubernetes namespaces, Kubernetes dashboard, Kubernetes Metrics Server, Field Selectors, CoreDNS, CRI, Kubernetes Topology Manager, Kubernetes governance: (SIG, KEP), Kustomize, controllers,ReadinessProbe, LivenessProbe
, KOPS, K9s, Kui, k3s, ImagePullBackOff, PDB, EndPoints, Kots, metadata, Karpenter, Replicated.com, Kubernetes Authenticating, Kubernetes timeline, Changelog/Versions, service accounts, Kubernetes Pod Lifecycle, Kubernetes Conformance Certified, Kubernetes backup, Kubernetes Pod Security Admission, tEKS, Kubernetes events, Kubernetes ports, Kubernetes policies, Connect, addons, DoKC, Kubernetes control plane, Kubernetes Federation, Kubernetes info, Kubetest2, Sidecar (Kubernetes)
Advertising: