Suggest scaling deployment to 3 before rollout of update

pull/20154/head
Tim Bannister 2020-04-07 16:54:30 +01:00
parent f85277d6d4
commit 4d3b7a06da
1 changed files with 8 additions and 0 deletions

View File

@ -433,6 +433,14 @@ kubectl create deployment my-nginx --image=nginx:1.14.2
deployment.apps/my-nginx created
```
with 3 replicas (so the old and new revisions can coexist):
```shell
kubectl scale deployment my-nginx --current-replicas=1 --replicas=3
```
```
deployment.apps/my-nginx scaled
```
To update to version 1.16.1, simply change `.spec.template.spec.containers[0].image` from `nginx:1.14.2` to `nginx:1.16.1`, with the kubectl commands we learned above.
```shell