From d32bf973ef67121a4cd3f19c6dd277998737a5ef Mon Sep 17 00:00:00 2001 From: Jun Xiang Tee Date: Tue, 19 Sep 2017 09:54:34 -0700 Subject: [PATCH] Update kubectl patch doc to use apps/v1beta2 APIs (#5422) --- .../tasks/run-application/deployment-patch-demo.yaml | 5 ++++- .../tasks/run-application/deployment-patch-demo.yaml | 5 ++++- .../update-api-object-kubectl-patch.md | 12 ++++++------ 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/cn/docs/tasks/run-application/deployment-patch-demo.yaml b/cn/docs/tasks/run-application/deployment-patch-demo.yaml index 3c45b6c8a931e..f3f1bc34d85ac 100644 --- a/cn/docs/tasks/run-application/deployment-patch-demo.yaml +++ b/cn/docs/tasks/run-application/deployment-patch-demo.yaml @@ -1,9 +1,12 @@ -apiVersion: apps/v1beta1 +apiVersion: apps/v1beta2 kind: Deployment metadata: name: patch-demo spec: replicas: 2 + selector: + matchLabels: + app: nginx template: metadata: labels: diff --git a/docs/tasks/run-application/deployment-patch-demo.yaml b/docs/tasks/run-application/deployment-patch-demo.yaml index 3c45b6c8a931e..f3f1bc34d85ac 100644 --- a/docs/tasks/run-application/deployment-patch-demo.yaml +++ b/docs/tasks/run-application/deployment-patch-demo.yaml @@ -1,9 +1,12 @@ -apiVersion: apps/v1beta1 +apiVersion: apps/v1beta2 kind: Deployment metadata: name: patch-demo spec: replicas: 2 + selector: + matchLabels: + app: nginx template: metadata: labels: diff --git a/docs/tasks/run-application/update-api-object-kubectl-patch.md b/docs/tasks/run-application/update-api-object-kubectl-patch.md index ec4b63642d5a6..051865a2bef4d 100644 --- a/docs/tasks/run-application/update-api-object-kubectl-patch.md +++ b/docs/tasks/run-application/update-api-object-kubectl-patch.md @@ -81,14 +81,14 @@ The output shows that the PodSpec in the Deployment has two Containers: ```shell containers: -- image: nginx - imagePullPolicy: Always - name: patch-demo-ctr - ... - image: redis imagePullPolicy: Always name: patch-demo-ctr-2 ... +- image: nginx + imagePullPolicy: Always + name: patch-demo-ctr + ... ``` View the Pods associated with your patched Deployment: @@ -118,10 +118,10 @@ The output shows that the Pod has two Containers: one running nginx and one runn ``` containers: -- image: nginx - ... - image: redis ... +- image: nginx + ... ``` ### Notes on the strategic merge patch