CKS: kubeadm config still uses `kubeadm.k8s.io/v1beta3` — external-etcd clusters break on Kubernetes 1.37+
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- kubernetes
- Área
- infrastructure
Línea de trabajo
Start with plugins/integrations/kubernetes-service/src/main/resources/conf/k8s-control-node.yml around lines 245-303, then read KubernetesClusterUpgradeWorker.java:75 and KubernetesClusterService.MIN_KUBERNETES_VERSION_HA_SUPPORT for supported-version handling. Reproduce the external-etcd path on Kubernetes 1.37 and verify the chosen compatibility approach also works with versions below 1.31. Done means external-etcd cluster creation succeeds across the supported Kubernetes range without changing the flag-only paths.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
problem
CKS writes a kubeadm configuration file into the control node's cloud-init, pinned to the v1beta3 API:
# plugins/integrations/kubernetes-service/src/main/resources/conf/k8s-control-node.yml:245
- path: /etc/kubernetes/kubeadm-config.yaml
...
apiVersion: kubeadm.k8s.io/v1beta3 # :249 (ClusterConfiguration)
...
apiVersion: kubeadm.k8s.io/v1beta3 # :260 (InitConfiguration)
kubeadm.k8s.io/v1beta3 was deprecated when v1beta4 was introduced in Kubernetes 1.31, with support to be "removed after a minimum of 3 Kubernetes minor releases"
(Kubernetes v1.31: kubeadm v1beta4).
It has since been reported removed as of Kubernetes 1.37
(kubernetes-sigs/image-builder#2151).
Once removed, kubeadm init --config rejects the file and cluster creation fails.
Scope — this affects external-etcd clusters only. That config file is passed to kubeadm on exactly one path:
# k8s-control-node.yml:299-303
if [[ ${EXTERNAL_ETCD_NODES} == true ]]; then
kubeadm init --config /etc/kubernetes/kubeadm-config.yaml --upload-certs
else
kubeadm init --token {{ ... }} --token-ttl 0 {{ k8s_control_node.cluster.initargs }} --cri-socket /run/containerd/containerd.sock
fi
So:
| Path | Uses kubeadm config file? | Affected on 1.37+ |
|---|---|---|
Control node, external etcd (:300) |
yes | yes |
Control node, stacked etcd (:302) |
no — flags only | no |
Additional control plane join (k8s-control-node-add.yml:239) |
no — flags only | no |
Worker join (k8s-node.yml:254) |
no — flags only | no |
grep -rn "kubeadm.k8s.io/v1beta" plugins/ systemvm/ returns only those two lines in the whole tree, so the fix is narrowly scoped.
Compounding this: CKS enforces no maximum supported Kubernetes version. addKubernetesSupportedVersion will happily accept 1.37.x, and the failure only surfaces part-way through cluster creation on the control node, which makes it hard to diagnose
versions
- Affects
main,4.20,4.21,4.22— the templatedv1beta3is identical on all of them. - Triggered by Kubernetes >= 1.37 (the release reported to have removed
v1beta3).
The steps to reproduce the bug
- Build a CKS binaries ISO for Kubernetes 1.37.x (
scripts/util/create-kubernetes-binaries-iso.sh). - Register it:
addKubernetesSupportedVersion semanticversion=1.37.0 url=... - Create a Kubernetes cluster with external etcd nodes (
etcdnodes=1or more), which selects the
kubeadm init --configpath. - On the control node,
kubeadm initfails because/etc/kubernetes/kubeadm-config.yamldeclares a
config API version that kubeadm no longer recognises. Cluster creation does not complete.
A cluster on the same version without external etcd should succeed, since that path passes flags only —
which is a useful way to confirm the diagnosis.
logs
root@test-cks-etcd-control-1a0a97ce958:/opt/bin# ./deploy-kube-system status
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.
To see the stack trace of this error execute with --v=5 or higher
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.
To see the stack trace of this error execute with --v=5 or higher
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.
To see the stack trace of this error execute with --v=5 or higher
Error: kubeadm init failed!
What to do about it?
Migrate the template to kubeadm.k8s.io/v1beta4 — but not unconditionally. v1beta4 requires
kubeadm >= 1.31, and CKS still supports much older Kubernetes versions (there are comparisons against
1.15.0 and 1.16.0 in KubernetesClusterUpgradeWorker.java:75 and
KubernetesClusterService.MIN_KUBERNETES_VERSION_HA_SUPPORT), with versions registered by the operator.
A straight bump would break clusters on anything below 1.31.
- Lenguaje dominante
- Java
- Estrellas
- 3.1k
- Forks
- 1.4k
- Merge medio
- 7 d 5 h
- PR fusionados (30 d)
- 28
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/cloudstack
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
apache/cloudstack#14222 ·
-
create-kubernetes-binaries-iso.sh builds the ISO without setting a volume ID on EL8 based os's Abiertobug component:kubernetes
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
apache/cloudstack#14180 ·
-
bug component:projects component:UI
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
apache/cloudstack#14070 · 5 comentarios ·
-
component:backup
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
apache/cloudstack#14013 ·
-
KVM agent fails to connect to Ceph RBD storage pool after upgrading Ceph client to Tentacle 20.2.4 Abiertobug component:ceph
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/cloudstack#13989 · 3 comentarios ·
Todos los issues de apache/cloudstack
Issues similares
-
[BUG]茶杯方块在取茶时会引发崩溃 Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
Cannot differ own consent and managed consents in My Consents view and detailed consent view. Abierto1.0.0-alpha2 Type/Improvement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
wso2/dpdp-accelerator#272 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
apache/rocketmq-dashboard#4860 · 1 comentario ·
-
agent-audit bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Vault-Web/cloud-page#144 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
infinispan/infinispan#18150 ·