kubeasz/22.upgrade.yml

40 lines
651 B
YAML
Raw Normal View History

2018-05-11 11:07:14 +08:00
# 集群更新存在一定风险,请谨慎操作
2018-05-11 12:02:41 +08:00
# 使用命令ansible-playbook -t upgrade_k8s 22.upgrade.yml
2018-05-11 11:07:14 +08:00
# 更新kubectl二进制
- hosts:
- kube-master
- kube-node
- deploy
roles:
- prepare
# 更新etcd集群
- hosts: etcd
roles:
- etcd
# docker更新为保证不中断业务不自动重启docker服务
- hosts:
- kube-master
2018-08-12 19:53:04 +08:00
- new-master
2018-05-11 11:07:14 +08:00
- kube-node
2018-08-12 19:53:04 +08:00
- new-node
2018-05-11 11:07:14 +08:00
roles:
- docker
# 更新master节点
2018-08-12 19:53:04 +08:00
- hosts:
- kube-master
- new-master
2018-05-11 11:07:14 +08:00
roles:
- kube-master
- kube-node
# 更新node节点
2018-08-12 19:53:04 +08:00
- hosts:
- kube-node
- new-node
2018-05-11 11:07:14 +08:00
roles:
- { role: kube-node, when: "DEPLOY_MODE != 'allinone'" }