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 - name: Remove binding to anonymous user
command: "{{ kubectl }} -n kube-public delete rolebinding kubeadm:bootstrap-signer-clusterinfo --ignore-not-found" 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) - 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" command: "{{ bin_dir }}/kubeadm --kubeconfig {{ kube_config_dir }}/admin.conf token create --config={{ kube_config_dir }}/kubeadm-config.yaml"
@@ -7,6 +7,7 @@ vm_memory: 3072
# Kubespray settings # Kubespray settings
auto_renew_certificates: true auto_renew_certificates: true
system_upgrade_autoclean: true system_upgrade_autoclean: true
remove_anonymous_access: true
# Currently ipvs not available on KVM: https://packages.ubuntu.com/search?suite=focal&arch=amd64&mode=exactfilename&searchon=contents&keywords=ip_vs_sh.ko # Currently ipvs not available on KVM: https://packages.ubuntu.com/search?suite=focal&arch=amd64&mode=exactfilename&searchon=contents&keywords=ip_vs_sh.ko
kube_proxy_mode: iptables kube_proxy_mode: iptables