mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-19 04:00:11 -03:30
Add graceful upgrade process
Based on #718 introduced by rsmitty. Includes all roles and all options to support deployment of new hosts in case they were added to inventory. Main difference here is that master role is evaluated first so that master components get upgraded first. Fixes #694
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
---
|
||||
|
||||
- name: Uncordon node
|
||||
command: kubectl uncordon {{ ansible_hostname }}
|
||||
command: "{{ bin_dir }}/kubectl uncordon {{ ansible_hostname }}"
|
||||
delegate_to: "{{ groups['kube-master'][0] }}"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
---
|
||||
|
||||
- name: Cordon node
|
||||
command: kubectl cordon {{ ansible_hostname }}
|
||||
command: "{{ bin_dir }}/kubectl cordon {{ ansible_hostname }}"
|
||||
delegate_to: "{{ groups['kube-master'][0] }}"
|
||||
|
||||
- name: Drain node
|
||||
command: kubectl drain --force --ignore-daemonsets --grace-period 30 --delete-local-data {{ ansible_hostname }}
|
||||
command: "{{ bin_dir }}/kubectl drain --force --ignore-daemonsets --grace-period 30 --delete-local-data {{ ansible_hostname }}"
|
||||
delegate_to: "{{ groups['kube-master'][0] }}"
|
||||
|
||||
- name: Sleep for grace period for draining
|
||||
|
||||
Reference in New Issue
Block a user