Update kubectl patch doc to use apps/v1beta2 APIs (#5422)

This commit is contained in:
Jun Xiang Tee
2017-09-19 09:54:34 -07:00
committed by Steve Perry
parent b3cf89cd75
commit d32bf973ef
3 changed files with 14 additions and 8 deletions
@@ -1,9 +1,12 @@
apiVersion: apps/v1beta1 apiVersion: apps/v1beta2
kind: Deployment kind: Deployment
metadata: metadata:
name: patch-demo name: patch-demo
spec: spec:
replicas: 2 replicas: 2
selector:
matchLabels:
app: nginx
template: template:
metadata: metadata:
labels: labels:
@@ -1,9 +1,12 @@
apiVersion: apps/v1beta1 apiVersion: apps/v1beta2
kind: Deployment kind: Deployment
metadata: metadata:
name: patch-demo name: patch-demo
spec: spec:
replicas: 2 replicas: 2
selector:
matchLabels:
app: nginx
template: template:
metadata: metadata:
labels: labels:
@@ -81,14 +81,14 @@ The output shows that the PodSpec in the Deployment has two Containers:
```shell ```shell
containers: containers:
- image: nginx
imagePullPolicy: Always
name: patch-demo-ctr
...
- image: redis - image: redis
imagePullPolicy: Always imagePullPolicy: Always
name: patch-demo-ctr-2 name: patch-demo-ctr-2
... ...
- image: nginx
imagePullPolicy: Always
name: patch-demo-ctr
...
``` ```
View the Pods associated with your patched Deployment: 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: containers:
- image: nginx
...
- image: redis - image: redis
... ...
- image: nginx
...
``` ```
### Notes on the strategic merge patch ### Notes on the strategic merge patch