Updates ZooKeeper example to use the Anti-Affinity field instead of annotation (#3013)
* Updates ZooKeeper example to use the Anti-Affinity field instead of the 1.5 annotation. * Changed podAntiAffinity field references to lower case Changed references to PodAntiAffinity object/concept to plain text Changed link to PodAntiAffinity to reference subsection
This commit is contained in:
committed by
Andrew Chen
parent
d7f3507d34
commit
9b686b38b3
@@ -51,22 +51,18 @@ spec:
|
||||
app: zk
|
||||
annotations:
|
||||
pod.alpha.kubernetes.io/initialized: "true"
|
||||
scheduler.alpha.kubernetes.io/affinity: >
|
||||
{
|
||||
"podAntiAffinity": {
|
||||
"requiredDuringSchedulingRequiredDuringExecution": [{
|
||||
"labelSelector": {
|
||||
"matchExpressions": [{
|
||||
"key": "app",
|
||||
"operator": "In",
|
||||
"values": ["zk-headless"]
|
||||
}]
|
||||
},
|
||||
"topologyKey": "kubernetes.io/hostname"
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
spec:
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: "app"
|
||||
operator: In
|
||||
values:
|
||||
- zk-headless
|
||||
topologyKey: "kubernetes.io/hostname"
|
||||
containers:
|
||||
- name: k8szk
|
||||
imagePullPolicy: Always
|
||||
|
||||
Reference in New Issue
Block a user