黑白玩家
博主:欢迎大家进行技术交流

1.查看原pod容器数量

[root@master-01 ~]# kubectl get pod
NAME                                READY     STATUS    RESTARTS   AGE
nginx-deployment-6b47cf4878-8mjkr   1/1       Running   0          1m
nginx-deployment-6b47cf4878-kr978   1/1       Running   0          1m
nginx-deployment-6b47cf4878-tvhvl   1/1       Running   0          1m

2.增加pod数量

[root@master-01 ~]# kubectl scale deploy/nginx-deployment --replicas=5
deployment.extensions "nginx-deployment" scaled

3.查看现在pod容器数量

[root@master-01 ~]# kubectl get pod
NAME                                READY     STATUS              RESTARTS   AGE
nginx-deployment-6b47cf4878-6r5dz   0/1       ContainerCreating   0          4s
nginx-deployment-6b47cf4878-7sjtt   0/1       ContainerCreating   0          4s
nginx-deployment-6b47cf4878-8mjkr   1/1       Running             0          2m
nginx-deployment-6b47cf4878-kr978   1/1       Running             0          2m
nginx-deployment-6b47cf4878-tvhvl   1/1       Running             0          2m
posted on 2020-11-14 10:29  黑白玩家  阅读(5820)  评论(0编辑  收藏  举报