mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 09:39:12 +03:00
first cut of an upgrade process
This commit is contained in:
committed by
Matthew Mosesohn
parent
948d9bdadb
commit
017a813621
12
roles/upgrade/pre-upgrade/tasks/main.yml
Normal file
12
roles/upgrade/pre-upgrade/tasks/main.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
|
||||
- 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
|
||||
Reference in New Issue
Block a user