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:
Kenneth Owens
2017-03-28 14:29:34 -07:00
committed by Andrew Chen
parent d7f3507d34
commit 9b686b38b3
2 changed files with 26 additions and 36 deletions
@@ -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