2017-11-12 14:54:20 +08:00
|
|
|
|
# 在deploy节点生成CA相关证书,以供整个集群使用
|
|
|
|
|
- hosts: deploy
|
2017-11-11 19:14:21 +08:00
|
|
|
|
roles:
|
2017-11-12 14:54:20 +08:00
|
|
|
|
- ca
|
2017-11-11 19:14:21 +08:00
|
|
|
|
|
2017-11-12 14:54:20 +08:00
|
|
|
|
# 集群节点的公共配置任务
|
|
|
|
|
- hosts: kube-cluster
|
2017-11-11 19:14:21 +08:00
|
|
|
|
roles:
|
2017-11-12 14:54:20 +08:00
|
|
|
|
- prepare
|
2017-11-11 19:14:21 +08:00
|
|
|
|
|
2017-11-12 14:54:20 +08:00
|
|
|
|
# 可选,多master部署时的负载均衡配置
|
|
|
|
|
- hosts: lb
|
2017-11-11 19:14:21 +08:00
|
|
|
|
roles:
|
2017-11-12 14:54:20 +08:00
|
|
|
|
- lb
|
2017-11-11 19:14:21 +08:00
|
|
|
|
|
2017-11-12 14:54:20 +08:00
|
|
|
|
- hosts: etcd
|
2017-11-11 19:14:21 +08:00
|
|
|
|
roles:
|
2017-11-12 14:54:20 +08:00
|
|
|
|
- etcd
|
2017-11-11 19:14:21 +08:00
|
|
|
|
|
|
|
|
|
- hosts: kube-cluster
|
|
|
|
|
roles:
|
2017-11-12 14:54:20 +08:00
|
|
|
|
- kubectl
|
|
|
|
|
- docker
|
2017-11-11 19:14:21 +08:00
|
|
|
|
- calico
|
|
|
|
|
|
|
|
|
|
- hosts: kube-master
|
|
|
|
|
roles:
|
|
|
|
|
- kube-master
|
|
|
|
|
|
|
|
|
|
- hosts: kube-node
|
|
|
|
|
roles:
|
|
|
|
|
- kube-node
|