Difference between revisions of "Spec.NodeSelector"

From wikieduonline
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

Related terms

See also

Advertising: