Skip to content

fix(k8s): 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 Apple's k8s 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/K8s/TestK8sRunSerial.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 from c424972 to 415a5a1 Compare October 17, 2026 15:20
…tion

Signed-off-by: yafeng-Soong <397655952@qq.com>

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