Docker Kubernetes 容器扩容与缩容

环境:

  • 系统:Centos 7.4 x64
  • Docker版本:18.09.0
  • Kubernetes版本:v1.8
  • 管理节点:192.168.1.79
  • 工作节点:192.168.1.78
  • 工作节点:192.168.1.77

创建环境:

  • 1、Deployment名称:nginx-deployment
  • 2、pods副本数为:3 
  • 3、image镜像:nginx1.9

管理节点:扩容或缩容deploymnet的pod副本数。

kubectl scale deployment nginx-deployment --replicas=10
kubectl scale 资源类型 资源名称 --replicas=扩容副本数
命令注解

相关文章: