Skip to content
Snippets Groups Projects
Unverified Commit 150a969c authored by Matthew Mosesohn's avatar Matthew Mosesohn Committed by GitHub
Browse files

Forcefully delete pods when necessary (#4328)

Pods on down/unresponsive nodes can't be deleted without
--force --grace-period=0.

Fixes #4314
parent 3c4cbf13
No related branches found
No related tags found
No related merge requests found
......@@ -44,5 +44,5 @@
when: needs_rotation
- name: Rotate Tokens | Delete pods in system namespace
command: "{{ bin_dir }}/kubectl --kubeconfig /etc/kubernetes/admin.conf delete pods -n kube-system --all"
command: "{{ bin_dir }}/kubectl --kubeconfig /etc/kubernetes/admin.conf delete pods -n kube-system --all --grace-period=0 --force"
when: needs_rotation
......@@ -133,7 +133,7 @@
- kube-proxy
- name: Restart all kube-proxy pods to ensure that they load the new configmap
shell: "{{ bin_dir }}/kubectl --kubeconfig {{ kube_config_dir }}/admin.conf delete pod -n kube-system -l k8s-app=kube-proxy"
shell: "{{ bin_dir }}/kubectl --kubeconfig {{ kube_config_dir }}/admin.conf delete pod -n kube-system -l k8s-app=kube-proxy --force --grace-period=0"
delegate_to: "{{groups['kube-master']|first}}"
run_once: true
when:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment