From bd5743f4271e681c350600c93db2df830867b0f0 Mon Sep 17 00:00:00 2001 From: Xiaodong Zhang Date: Sat, 10 Feb 2018 10:44:51 +0800 Subject: [PATCH] Bump up Deployment version and delete useless file (#7320) --- .../stateless-application/deployment-scale.yaml | 16 ---------------- .../stateless-application/deployment-update.yaml | 16 ---------------- .../stateless-application/deployment.yaml | 5 ++++- 3 files changed, 4 insertions(+), 33 deletions(-) delete mode 100644 docs/tutorials/stateless-application/deployment-scale.yaml delete mode 100644 docs/tutorials/stateless-application/deployment-update.yaml diff --git a/docs/tutorials/stateless-application/deployment-scale.yaml b/docs/tutorials/stateless-application/deployment-scale.yaml deleted file mode 100644 index 01351c3b5a..0000000000 --- a/docs/tutorials/stateless-application/deployment-scale.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - name: nginx-deployment -spec: - replicas: 4 # Update the replicas from 2 to 4 - template: - metadata: - labels: - app: nginx - spec: - containers: - - name: nginx - image: nginx:1.8 - ports: - - containerPort: 80 diff --git a/docs/tutorials/stateless-application/deployment-update.yaml b/docs/tutorials/stateless-application/deployment-update.yaml deleted file mode 100644 index 8f0ac0b48c..0000000000 --- a/docs/tutorials/stateless-application/deployment-update.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - name: nginx-deployment -spec: - replicas: 2 - template: - metadata: - labels: - app: nginx - spec: - containers: - - name: nginx - image: nginx:1.8 # Update the version of nginx from 1.7.9 to 1.8 - ports: - - containerPort: 80 diff --git a/docs/tutorials/stateless-application/deployment.yaml b/docs/tutorials/stateless-application/deployment.yaml index 8d14e2ef08..485be0dabc 100644 --- a/docs/tutorials/stateless-application/deployment.yaml +++ b/docs/tutorials/stateless-application/deployment.yaml @@ -1,8 +1,11 @@ -apiVersion: apps/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment spec: + selector: + matchLabels: + app: nginx replicas: 2 # tells deployment to run 2 pods matching the template template: # create pods using pod definition in this template metadata: