Difference between revisions of "Kubernetes Node Affinity"

From wikieduonline
Jump to navigation Jump to search
Line 1: Line 1:
 
* https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/
 
* https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/
 
<code>[[kubectl describe pv]]</code>
 
<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 ==

Revision as of 09:29, 25 January 2024

Advertising: