cks: use kubeadm v1beta4 configuration API for external etcd clusters - #14183
Open
kiranchavala wants to merge 1 commit into
Open
kiranchavala wants to merge 1 commit into
kiranchavala wants to merge 1 commit into
Conversation
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>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.22 #14183 +/- ##
=========================================
Coverage 17.93% 17.93%
- Complexity 16142 16143 +1
=========================================
Files 5928 5928
Lines 535205 535205
Branches 65501 65501
=========================================
+ Hits 95989 95991 +2
+ Misses 428286 428285 -1
+ Partials 10930 10929 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes: #14181
Tested on CloudStack 4.22 / KVM with Kubernetes v1.37.0 (
kubeadm version -o shorton the control node).Before — creating a cluster with external etcd nodes,
kubeadm initfails with the error above, repeated for each of the threeMAX_SETUP_CRUCIAL_CMD_ATTEMPTSretries and then indefinitely by systemd:After — with the template changed to v1beta4,
kubeadm init --configcompletes and the control plane comes up: