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