From 4427a95bfe397742725cac875d661504b49c72ee Mon Sep 17 00:00:00 2001 From: SEONGHYUN HONG Date: Mon, 26 Oct 2026 12:56:06 +0900 Subject: [PATCH] fix(control-plane): fetch discovery kubeconfig when adding control plane nodes with remove_anonymous_access (#13683) * fix(control-plane): fetch discovery kubeconfig when adding control plane nodes The 'Get kubeconfig for join discovery process' task is run_once, so its 'when' is evaluated only for the first control plane node. On an existing cluster that node has already run kubeadm, so the task is skipped for all hosts and 'Copy discovery kubeconfig' fails on the new control plane nodes with "'dict object' has no attribute 'stdout'" when remove_anonymous_access (file discovery) is enabled. Drop the kubeadm_already_run condition from the run_once fetch. The copy and join tasks keep their per-host conditions. Signed-off-by: s3onghyun * control-plane: mark discovery kubeconfig fetch as not changed Co-authored-by: guoard --------- Signed-off-by: s3onghyun Co-authored-by: guoard --- roles/kubernetes/control-plane/tasks/kubeadm-secondary.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/kubernetes/control-plane/tasks/kubeadm-secondary.yml b/roles/kubernetes/control-plane/tasks/kubeadm-secondary.yml index be65ed51e..15b963c7d 100644 --- a/roles/kubernetes/control-plane/tasks/kubeadm-secondary.yml +++ b/roles/kubernetes/control-plane/tasks/kubeadm-secondary.yml @@ -45,9 +45,9 @@ register: kubeconfig_file_discovery run_once: true delegate_to: "{{ groups['kube_control_plane'] | first }}" + changed_when: false when: - kubeadm_use_file_discovery - - kubeadm_already_run is not defined or not kubeadm_already_run.stat.exists - name: Copy discovery kubeconfig copy: