Browse Source
Merge pull request #3307 from kaarolch/upgrade_docs
Calico version verification before cluster upgrade begin.
pull/3353/head
k8s-ci-robot
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
20 additions and
2 deletions
-
docs/upgrades.md
-
roles/kubernetes/preinstall/tasks/0020-verify-settings.yml
|
|
@ -35,7 +35,7 @@ ansible-playbook cluster.yml -i inventory/sample/hosts.ini -e kube_version=v1.4. |
|
|
|
|
|
|
|
#### Graceful upgrade |
|
|
|
|
|
|
|
Kubespray also supports cordon, drain and uncordoning of nodes when performing |
|
|
|
Kubespray also supports cordon, drain and uncordoning of nodes when performing |
|
|
|
a cluster upgrade. There is a separate playbook used for this purpose. It is |
|
|
|
important to note that upgrade-cluster.yml can only be used for upgrading an |
|
|
|
existing cluster. That means there must be at least 1 kube-master already |
|
|
@ -86,7 +86,7 @@ for impact to user deployed pods. |
|
|
|
|
|
|
|
A deployer may want to upgrade specific components in order to minimize risk |
|
|
|
or save time. This strategy is not covered by CI as of this writing, so it is |
|
|
|
not guaranteed to work. |
|
|
|
not guaranteed to work. |
|
|
|
|
|
|
|
These commands are useful only for upgrading fully-deployed, healthy, existing |
|
|
|
hosts. This will definitely not work for undeployed or partially deployed |
|
|
|
|
|
@ -127,3 +127,21 @@ |
|
|
|
tags: |
|
|
|
- cloud-provider |
|
|
|
- facts |
|
|
|
|
|
|
|
- name: "Get current version of calico cluster version" |
|
|
|
shell: "{{ bin_dir }}/calicoctl version | grep 'Cluster Version' | awk '{ print $3}'" |
|
|
|
register: calico_version_on_server |
|
|
|
run_once: yes |
|
|
|
delegate_to: "{{ groups['kube-master'][0] }}" |
|
|
|
|
|
|
|
|
|
|
|
- name: "Check that calico version is enought for upgrade" |
|
|
|
assert: |
|
|
|
that: |
|
|
|
- calico_version_on_server.stdout|version_compare('v2.6.5', '>=') |
|
|
|
msg: "Your version of calico is not fresh enough for upgrade. Minimum version v2.6.5" |
|
|
|
when: |
|
|
|
- 'calico_version_on_server.stdout is defined' |
|
|
|
- 'calico_version_on_server.stdout != ""' |
|
|
|
- inventory_hostname == groups['kube-master'][0] |
|
|
|
run_once: yes |