mirror of https://github.com/easzlab/kubeasz.git
40 lines
651 B
YAML
40 lines
651 B
YAML
# 集群更新存在一定风险,请谨慎操作
|
||
# 使用命令:ansible-playbook -t upgrade_k8s 22.upgrade.yml
|
||
|
||
# 更新kubectl二进制
|
||
- hosts:
|
||
- kube-master
|
||
- kube-node
|
||
- deploy
|
||
roles:
|
||
- prepare
|
||
|
||
# 更新etcd集群
|
||
- hosts: etcd
|
||
roles:
|
||
- etcd
|
||
|
||
# docker更新,为保证不中断业务,不自动重启docker服务
|
||
- hosts:
|
||
- kube-master
|
||
- new-master
|
||
- kube-node
|
||
- new-node
|
||
roles:
|
||
- docker
|
||
|
||
# 更新master节点
|
||
- hosts:
|
||
- kube-master
|
||
- new-master
|
||
roles:
|
||
- kube-master
|
||
- kube-node
|
||
|
||
# 更新node节点
|
||
- hosts:
|
||
- kube-node
|
||
- new-node
|
||
roles:
|
||
- { role: kube-node, when: "DEPLOY_MODE != 'allinone'" }
|