From 282efede0290b1952ad3035944d90600621bace8 Mon Sep 17 00:00:00 2001 From: Kiran Chavala Date: Wed, 16 Sep 2026 16:58:08 +0530 Subject: [PATCH] cks: use kubeadm v1beta4 configuration API for external etcd clusters The control node's /etc/kubernetes/kubeadm-config.yaml was written with the kubeadm.k8s.io/v1beta3 configuration API. kubeadm removed v1beta3 in Kubernetes 1.37, so "kubeadm init --config" now rejects the file outright: error: your configuration file uses an old API spec: "kubeadm.k8s.io/v1beta3" (kind: "ClusterConfiguration"). Please use kubeadm v1.36 instead and run 'kubeadm config migrate --old-config old-config-file --new-config new-config-file', which will write the new, similar spec using a newer API version. Error: kubeadm init failed! This only affects clusters created with external etcd nodes, as that is the only path which passes the configuration file to kubeadm; the stacked etcd path and both join paths use command line flags and are unaffected. The failure is also hard to spot: kubeadm init runs from the deploy-kube-system systemd unit, runcmd only does "systemctl start" on a Type=simple unit so cloud-init reports success, and Restart=on-failure with StartLimitInterval=0 retries the whole cycle indefinitely. Switch both documents to v1beta4. Only the apiVersion changes - neither document sets the extraArgs fields whose shape changed between the two versions. Tested on Kubernetes v1.37.0 (KVM): an external etcd cluster which previously failed at kubeadm init now completes and the control plane comes up. Co-Authored-By: Claude Opus 5 (1M context) --- .../src/main/resources/conf/k8s-control-node.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/integrations/kubernetes-service/src/main/resources/conf/k8s-control-node.yml b/plugins/integrations/kubernetes-service/src/main/resources/conf/k8s-control-node.yml index 70291dd1c35a..8360746a81ac 100644 --- a/plugins/integrations/kubernetes-service/src/main/resources/conf/k8s-control-node.yml +++ b/plugins/integrations/kubernetes-service/src/main/resources/conf/k8s-control-node.yml @@ -246,7 +246,7 @@ write_files: permissions: '0644' owner: root:root content: | - apiVersion: kubeadm.k8s.io/v1beta3 + apiVersion: kubeadm.k8s.io/v1beta4 kind: ClusterConfiguration apiServer: certSANs: @@ -257,7 +257,7 @@ write_files: endpoints: {{ etcd.etcd_endpoint_list }} --- - apiVersion: kubeadm.k8s.io/v1beta3 + apiVersion: kubeadm.k8s.io/v1beta4 kind: InitConfiguration bootstrapTokens: - token: "{{ k8s_control_node.cluster.token }}"