Skip to content

Conversation

prezha
Copy link
Contributor

@prezha prezha commented Aug 10, 2025

helps #21261


note: after merging this pr and #21278, we should let automation kick in to update all appropriate files, eg, #21223


we need to specify the --kubernetes-version flag with appropriate k8s version when using kubeadm to get a list of images, or we might not get correct values - eg, for etcd:

$ kubeadm version -o short
v1.34.0-beta.0
$ kubeadm config images list
registry.k8s.io/kube-apiserver:v1.33.3
registry.k8s.io/kube-controller-manager:v1.33.3
registry.k8s.io/kube-scheduler:v1.33.3
registry.k8s.io/kube-proxy:v1.33.3
registry.k8s.io/coredns/coredns:v1.12.1
registry.k8s.io/pause:3.10
registry.k8s.io/etcd:3.5.21-0

whereas if we specify --kubernetes-version v1.34.0-beta.0, we get the correct version:

$ kubeadm config images list --kubernetes-version v1.34.0-beta.0
registry.k8s.io/kube-apiserver:v1.34.0-beta.0
registry.k8s.io/kube-controller-manager:v1.34.0-beta.0
registry.k8s.io/kube-scheduler:v1.34.0-beta.0
registry.k8s.io/kube-proxy:v1.34.0-beta.0
registry.k8s.io/coredns/coredns:v1.12.1
registry.k8s.io/pause:3.10
registry.k8s.io/etcd:3.6.1-1

test run:

$ cd ./hack
$ go run update/kubeadm_constants/kubeadm_constants.go
I0810 23:44:32.603808  238642 update.go:91] The Plan:
{
  "pkg/minikube/constants/constants_kubeadm_images.go": {
    "Content": null,
    "Replace": {
      "KubeadmImages = .*": "KubeadmImages = map[string]map[string]string{ \n\t\t\"v1.34.0-beta.0\": {\n\t\t\t\"coredns/coredns\": \"v1.12.1\",\n\t\t\t\"etcd\": \"3.6.1-1\",\n\t\t\t\"pause\": \"3.10\",\n\t\t},"
    }
  }
}
I0810 23:44:32.605023  238642 update.go:100] Local repo successfully updated
I0810 23:44:42.412565  238642 update.go:91] The Plan:
{
  "pkg/minikube/constants/constants_kubeadm_images.go": {
    "Content": null,
    "Replace": {
      "KubeadmImages = .*": "KubeadmImages = map[string]map[string]string{ \n\t\t\"v1.34.0-rc.0\": {\n\t\t\t\"coredns/coredns\": \"v1.12.1\",\n\t\t\t\"etcd\": \"3.6.4-0\",\n\t\t\t\"pause\": \"3.10.1\",\n\t\t},"
    }
  }
}
I0810 23:44:42.412836  238642 update.go:100] Local repo successfully updated
I0810 23:44:52.983901  238642 update.go:91] The Plan:
{
  "pkg/minikube/constants/constants_kubeadm_images.go": {
    "Content": null,
    "Replace": {
      "KubeadmImages = .*": "KubeadmImages = map[string]map[string]string{ \n\t\t\"v1.34.0-rc.1\": {\n\t\t\t\"coredns/coredns\": \"v1.12.1\",\n\t\t\t\"etcd\": \"3.6.4-0\",\n\t\t\t\"pause\": \"3.10.1\",\n\t\t},"
    }
  }
}
I0810 23:44:52.984466  238642 update.go:100] Local repo successfully updated

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 10, 2025
@prezha prezha force-pushed the fix-update-kubeadm-constants branch from 18d80be to 6830eeb Compare August 11, 2025 00:23
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 11, 2025
@medyagh medyagh merged commit 9b7d982 into kubernetes:master Aug 12, 2025
25 of 27 checks passed
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: medyagh, prezha

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

pavansaikrishna78 pushed a commit to pavansaikrishna78/minikube that referenced this pull request Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants