Repository navigation
CKS: use kubeadm v1beta4 config for Kubernetes 1.31 and later - #14899
Open
bhouse-nexthop wants to merge 1 commit into
Open
bhouse-nexthop wants to merge 1 commit into
bhouse-nexthop wants to merge 1 commit into
Conversation
The kubeadm config CKS writes for clusters with external etcd always used kubeadm.k8s.io/v1beta3. v1beta4 replaced it in Kubernetes 1.31, and kubeadm 1.37 refuses v1beta3. Pick v1beta4 when the cluster's Kubernetes version is 1.31 or later and keep v1beta3 for older versions, which do not know v1beta4. The fields CKS sets are the same in both. Signed-off-by: Brad House <bhouse@nexthop.ai>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #14899 +/- ##
=========================================
Coverage 18.34% 18.34%
- Complexity 16671 16679 +8
=========================================
Files 5939 5939
Lines 537817 537824 +7
Branches 65938 65938
=========================================
+ Hits 98640 98670 +30
+ Misses 427954 427929 -25
- Partials 11223 11225 +2
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:
|
Collaborator
Author
|
Tested on a KVM lab with 4.22 plus this change: an external etcd cluster on k8s 1.32.3 came up Running, and the control node's kubeadm config is Not run: a version below 1.31 on a live cluster (unit test covers the cutoff). |
This branch has not been deployed
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 #14897
For clusters with external etcd nodes, CKS writes a kubeadm config file and runs
kubeadm init --configwith it. The file always usedkubeadm.k8s.io/v1beta3. kubeadm 1.37 refusesv1beta3, and kubeadm before 1.31 doesn't knowv1beta4.kubeadm initfailsEvery field CKS sets (
apiServer.certSANs,controlPlaneEndpoint,etcd.external.endpoints,bootstrapTokens,nodeRegistration.criSocket,localAPIEndpoint,certificateKey) is the same in both versions. None of the fields whose shape changed in v1beta4, such asextraArgs, are used.Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
How Has This Been Tested?
kubeadm config validate --configwith the release binaries:How did you try to break this feature and the system with this change?
k8s-node.yml,k8s-control-node-add.yml) andupgrade-kubernetes.shpass kubeadm flags and don't read a config file, so they are not affected.kubeadm init, so upgrades across 1.31 are not affected.