message
This commit is contained in:
parent
776529fc64
commit
1ebd2ad171
20
pod-with-node-antiaffinity.yaml
Normal file
20
pod-with-node-antiaffinity.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#kubectl label nodes node01 disktype=ssd
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: nginx
|
||||||
|
spec:
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: disktype
|
||||||
|
operator: NotIn
|
||||||
|
values:
|
||||||
|
- ssd
|
||||||
|
containers:
|
||||||
|
- name: nginx
|
||||||
|
image: nginx
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
Loading…
Reference in New Issue
Block a user