k8s-sig-cluster-lifecycleawskubesprayhigh-availabilityansiblekubernetes-clustergcekubernetesbare-metal
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
401 B
12 lines
401 B
---
|
|
|
|
- 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 30 --delete-local-data {{ ansible_hostname }}"
|
|
delegate_to: "{{ groups['kube-master'][0] }}"
|
|
|
|
- name: Sleep for grace period for draining
|
|
pause: seconds=30
|