This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.9.2.8. 手动扩展
除了回滚外,您还可以对 Web 控制台中的副本数量进行精细控制,或者使用 oc scale
命令进行精细的控制。例如,以下命令将部署配置 frontend
中的副本设置为 3。
oc scale dc frontend --replicas=3
$ oc scale dc frontend --replicas=3
副本数量最终会传播到部署配置 frontend
配置的部署的预期和当前状态。
注意
也可以使用 oc autoscale
命令自动扩展 Pod。如需了解更多详细信息,请参阅 Pod 自动扩展。