kubeasz/22.upgrade.yml

36 lines
601 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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