c12s-kubespray/roles/upgrade/pre-upgrade/tasks/main.yml

12 lines
350 B
YAML
Raw Normal View History

2016-12-09 18:44:52 +00:00
---
- name: Cordon node
command: kubectl cordon {{ ansible_hostname }}
delegate_to: "{{ groups['kube-master'][0] }}"
- name: Drain node
command: kubectl drain --force --ignore-daemonsets --delete-local-data {{ ansible_hostname }}
delegate_to: "{{ groups['kube-master'][0] }}"
- name: Sleep for grace period for draining
pause: seconds=30