diff --git a/example/example-pod-with-node-affinity.yaml b/example/example-pod-with-node-affinity.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ebe89654f7e16f85e43558213eb2e4713f36fdfb --- /dev/null +++ b/example/example-pod-with-node-affinity.yaml @@ -0,0 +1,28 @@ +apiVersion: v1 +kind: Pod +metadata: + name: volume-test + namespace: default +spec: + containers: + - name: volume-test + image: nginx:stable-alpine + imagePullPolicy: IfNotPresent + volumeMounts: + - name: volv + mountPath: /data + ports: + - containerPort: 80 + volumes: + - name: volv + persistentVolumeClaim: + claimName: local-path-pvc + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - yasker-lp-dev1