From 62d07eeb9bbffdc231c0ea9d5db743e65e91e9ee Mon Sep 17 00:00:00 2001 From: Xiaodong Zhang Date: Sat, 10 Feb 2018 06:06:54 +0800 Subject: [PATCH] Bump up deployment version in concepts/configuration folder (#7328) --- docs/concepts/configuration/assign-pod-node.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/concepts/configuration/assign-pod-node.md b/docs/concepts/configuration/assign-pod-node.md index b0dc7aba4c..121a636125 100644 --- a/docs/concepts/configuration/assign-pod-node.md +++ b/docs/concepts/configuration/assign-pod-node.md @@ -220,11 +220,14 @@ In a three node cluster, a web application has in-memory cache such as redis. We Here is the yaml snippet of a simple redis deployment with three replicas and selector label `app=store`. The deployment has `PodAntiAffinity` configured to ensure the scheduler does not co-locate replicas on a single node. ```yaml -apiVersion: apps/v1beta1 # for versions before 1.6.0 use extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: redis-cache spec: + selector: + matchLabels: + app: store replicas: 3 template: metadata: @@ -249,11 +252,14 @@ spec: The below yaml snippet of the webserver deployment has `podAntiAffinity` and `podAffinity` configured. This informs the scheduler that all its replicas are to be co-located with pods that have selector label `app=store`. This will also ensure that each web-server replica does not co-locate on a single node. ```yaml -apiVersion: apps/v1beta1 # for versions before 1.6.0 use extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: web-server spec: + selector: + matchLabels: + app: web-store replicas: 3 template: metadata: