Merge pull request #20154 from sftim/20200407_suggest_kubectl_scale

Suggest scaling deployment to 3 before rollout of update
This commit is contained in:
Kubernetes Prow Robot 2020-04-08 17:11:44 -07:00 committed by GitHub
commit 26ddea1f27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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