Skip to content

fix(cluster): link kubeadm config to /kind/kubeadm.conf for cert regeneration - #2344

Open
yafeng-Soong wants to merge 1 commit into
apple:mainfrom
yafeng-Soong:fix/k8s-kind-kubeadm-conf
Open

yafeng-Soong wants to merge 1 commit into
apple:mainfrom
yafeng-Soong:fix/k8s-kind-kubeadm-conf

Conversation

@yafeng-Soong

@yafeng-Soong yafeng-Soong commented Oct 4, 2026 •

Copy link
Copy Markdown

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

Closes #2410

When a kindest/node container restarts with an IP change, its built-in entrypoint deletes /etc/kubernetes/pki/apiserver.*
and attempts to regenerate them via kubeadm init phase certs apiserver --config /kind/kubeadm.conf.
Because the cluster plugin only wrote the configuration to /etc/kubernetes/kubeadm-config.yaml, the regeneration failed with
open /kind/kubeadm.conf: no such file or directory, causing kube-apiserver to fail permanently and kubectl commands to hang.

This PR ensures that /kind/kubeadm.conf is symlinked to /etc/kubernetes/kubeadm-config.yaml during control plane bootstrap,
allowing the kind entrypoint to successfully refresh API server certificates on container reboot.

Testing

  • Tested locally (verified cluster survived IP changes and restarts without apiserver crashing)
  • Added/updated tests (Tests/IntegrationTests/Cluster/TestClusterRunSerial.swift)
  • Added/updated docs

@yafeng-Soong yafeng-Soong changed the title fix(k8s): link kubeadm config to /kind/kubeadm.conf for cert regenera… fix(k8s): link kubeadm config to /kind/kubeadm.conf for cert regeneration Oct 4, 2026
@yafeng-Soong
yafeng-Soong force-pushed the fix/k8s-kind-kubeadm-conf branch 2 times, most recently from 415a5a1 to 85c0bcf Compare October 17, 2026 16:04
@yafeng-Soong
yafeng-Soong force-pushed the fix/k8s-kind-kubeadm-conf branch 3 times, most recently from 496fb22 to 3914de7 Compare October 29, 2026 13:09
@yafeng-Soong
yafeng-Soong force-pushed the fix/k8s-kind-kubeadm-conf branch from 3914de7 to 30bba64 Compare November 3, 2026 16:38
@yafeng-Soong yafeng-Soong changed the title fix(k8s): link kubeadm config to /kind/kubeadm.conf for cert regeneration fix(cluster): link kubeadm config to /kind/kubeadm.conf for cert regeneration Nov 3, 2026
@yafeng-Soong
yafeng-Soong force-pushed the fix/k8s-kind-kubeadm-conf branch from 30bba64 to 473f99d Compare November 7, 2026 16:41
…neration

Signed-off-by: yafeng-Soong <397655952@qq.com>
@yafeng-Soong
yafeng-Soong force-pushed the fix/k8s-kind-kubeadm-conf branch from 473f99d to 1e67019 Compare November 17, 2026 14:56

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: k8s kube-apiserver fails to start after container restart due to missing /kind/kubeadm.conf

1 participant