Fix anonymous access cleanup during cluster upgrade (#13417)

This commit is contained in:
Javad
2026-10-12 09:23:25 +00:00
committed by GitHub
parent 69ad777b45
commit a4ac5d1121
2 changed files with 5 additions and 1 deletions
@@ -226,7 +226,10 @@
- name: Remove binding to anonymous user
command: "{{ kubectl }} -n kube-public delete rolebinding kubeadm:bootstrap-signer-clusterinfo --ignore-not-found"
when: inventory_hostname == first_kube_control_plane and remove_anonymous_access
when:
- inventory_hostname == first_kube_control_plane
- remove_anonymous_access
- not upgrade_cluster_setup
- name: Create kubeadm token for joining nodes with 24h expiration (default)
command: "{{ bin_dir }}/kubeadm --kubeconfig {{ kube_config_dir }}/admin.conf token create --config={{ kube_config_dir }}/kubeadm-config.yaml"