add node-based upgrade (#7785)
This commit is contained in:
parent
aa00c1d91a
commit
85d18fc107
1 changed files with 23 additions and 0 deletions
|
@ -62,6 +62,29 @@ If you want to manually control the upgrade procedure, you can use the variables
|
||||||
`upgrade_node_confirm: true` - waiting to confirmation to upgrade next node
|
`upgrade_node_confirm: true` - waiting to confirmation to upgrade next node
|
||||||
`upgrade_node_pause_seconds: 60` - pause 60 seconds before upgrade next node
|
`upgrade_node_pause_seconds: 60` - pause 60 seconds before upgrade next node
|
||||||
|
|
||||||
|
## Node-based upgrade
|
||||||
|
|
||||||
|
If you don't want to upgrade all nodes in one run, you can use `--limit` [patterns](https://docs.ansible.com/ansible/latest/user_guide/intro_patterns.html#patterns-and-ansible-playbook-flags).
|
||||||
|
|
||||||
|
Before using `--limit` run playbook `facts.yml` without the limit to refresh facts cache for all nodes:
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
ansible-playbook facts.yml -b -i inventory/sample/hosts.ini
|
||||||
|
```
|
||||||
|
|
||||||
|
After this upgrade control plane and etcd groups [#5147](https://github.com/kubernetes-sigs/kubespray/issues/5147):
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
ansible-playbook upgrade-cluster.yml -b -i inventory/sample/hosts.ini -e kube_version=v1.20.7 --limit "kube_control_plane:etcd"
|
||||||
|
```
|
||||||
|
|
||||||
|
Now you can upgrade other nodes in any order and quantity:
|
||||||
|
|
||||||
|
```ShellSession
|
||||||
|
ansible-playbook upgrade-cluster.yml -b -i inventory/sample/hosts.ini -e kube_version=v1.20.7 --limit "node4:node6:node7:node12"
|
||||||
|
ansible-playbook upgrade-cluster.yml -b -i inventory/sample/hosts.ini -e kube_version=v1.20.7 --limit "node5*"
|
||||||
|
```
|
||||||
|
|
||||||
## Multiple upgrades
|
## Multiple upgrades
|
||||||
|
|
||||||
:warning: [Do not skip releases when upgrading--upgrade by one tag at a time.](https://github.com/kubernetes-sigs/kubespray/issues/3849#issuecomment-451386515) :warning:
|
:warning: [Do not skip releases when upgrading--upgrade by one tag at a time.](https://github.com/kubernetes-sigs/kubespray/issues/3849#issuecomment-451386515) :warning:
|
||||||
|
|
Loading…
Reference in a new issue