# kubectl get pod --selector app = test -o wide
Expand the number of pods to 4 # kubectl scale rc test-rc --replicas = 4 # kubectl get pod --selector app = test -o wide
Shrink pods to 1 # kubectl scale rc test-rc --replicas = 1 # kubectl get pod --selector app = test -o wide
By setting the number of pods to 0, all pods associated with the RC can be deleted.
Rolling upgrade
Rolling upgrade using gradual replacement strategy.
Through an example to demonstrate, demo applications from V1 version to V2 version.
Use -update -period = 10s to set the number of copies of RC that incrementally increase the version V2 of RC every 10 seconds and gradually reduce the number of copies of RC for version V1. After the upgrade is complete, remove the V1 version of the RC, keep the V2 version of the RC.
During the upgrade, you can roll back. If the upgrade is complete, you can not use this command to roll back.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.