Skip to content

Commit 282efed

Browse files
kiranchavalaclaude
andcommitted
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) <noreply@anthropic.com>
1 parent 10037c8 commit 282efed

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

plugins/integrations/kubernetes-service/src/main/resources/conf/k8s-control-node.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ write_files:
246246
permissions: '0644'
247247
owner: root:root
248248
content: |
249-
apiVersion: kubeadm.k8s.io/v1beta3
249+
apiVersion: kubeadm.k8s.io/v1beta4
250250
kind: ClusterConfiguration
251251
apiServer:
252252
certSANs:
@@ -257,7 +257,7 @@ write_files:
257257
endpoints:
258258
{{ etcd.etcd_endpoint_list }}
259259
---
260-
apiVersion: kubeadm.k8s.io/v1beta3
260+
apiVersion: kubeadm.k8s.io/v1beta4
261261
kind: InitConfiguration
262262
bootstrapTokens:
263263
- token: "{{ k8s_control_node.cluster.token }}"

0 commit comments

Comments
 (0)