Skip to content
Snippets Groups Projects
Unverified Commit 85d18fc1 authored by andrew.k's avatar andrew.k Committed by GitHub
Browse files

add node-based upgrade (#7785)

parent aa00c1d9
No related branches found
No related tags found
No related merge requests found
...@@ -62,6 +62,29 @@ If you want to manually control the upgrade procedure, you can use the variables ...@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment