Browse Source

Clean kubectl cache after upgrade on first master (#5479)

Resolves issue where kubectl cache of <v1.16 api schema
interferes with interacting with daemonsets and deployments.

Change-Id: I63b7046958f2008eb144b6da0004c598f945e0ae
pull/5511/head
Matthew Mosesohn 4 years ago
committed by Kubernetes Prow Robot
parent
commit
5fab610fab
1 changed files with 8 additions and 0 deletions
  1. 8
      roles/kubernetes/master/tasks/kubeadm-upgrade.yml

8
roles/kubernetes/master/tasks/kubeadm-upgrade.yml

@ -38,6 +38,14 @@
- kubeadm_upgrade.stdout_lines | length > 1 - kubeadm_upgrade.stdout_lines | length > 1
notify: Master | restart kubelet notify: Master | restart kubelet
- name: kubeadm | clean kubectl cache to refresh api types
file:
path: "{{ item }}"
state: absent
with_items:
- /root/.kube/cache
- /root/.kube/http-cache
# FIXME: https://github.com/kubernetes/kubeadm/issues/1318 # FIXME: https://github.com/kubernetes/kubeadm/issues/1318
- name: kubeadm | scale down coredns replicas to 0 if not using coredns dns_mode - name: kubeadm | scale down coredns replicas to 0 if not using coredns dns_mode
command: >- command: >-

Loading…
Cancel
Save