68a1faaaa0
Graceful upgrades require 3 nodes Drain now has a command timeout of 40s
18 lines
488 B
YAML
18 lines
488 B
YAML
---
|
|
|
|
- name: Cordon node
|
|
command: "{{ bin_dir }}/kubectl cordon {{ ansible_hostname }}"
|
|
delegate_to: "{{ groups['kube-master'][0] }}"
|
|
|
|
- name: Drain node
|
|
command: >-
|
|
{{ bin_dir }}/kubectl drain
|
|
--force
|
|
--ignore-daemonsets
|
|
--grace-period {{ drain_grace_period }}
|
|
--timeout {{ drain_timeout }}
|
|
--delete-local-data {{ ansible_hostname }}
|
|
delegate_to: "{{ groups['kube-master'][0] }}"
|
|
|
|
- name: Sleep for grace period for draining
|
|
pause: seconds=30
|