-
Notifications
You must be signed in to change notification settings - Fork 716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kubeadm requires kubelet.conf to use specific username, although kubelet doesn't require it #3014
Comments
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/sig cluster-lifecycle |
/transfer kubeadm |
i think we can just remove the validation; this does seem like something we don't need to error on. i'm +0 whether we should backport a fix for older releases for this one. for < 1.30 users can follow the recommended naming. kubeadm does not follow the "credential name" guidance in the docs FWIW:
it follows the "system:..." naming which arguably makes more sense. |
technically, for external CA mode on a host that has i guess our https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/#external-ca-mode section lacks details on how to use kubeadm phases to generate certs and kubeconfig out of band. |
Correct, if just the CA passed kubeadm will generate correct kubelet.conf with Perhaps instead of "does this kubeconfig has authinfo with expected name" kubeadm should check if its valid - for instance https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/client-go/tools/clientcmd/api/helpers.go#L47 seems to be a function which may be useful for this purpose. WDYT? |
i think it would be sufficient to get the auth for the current context and update it. |
What happened?
See issue in kubernetes/kubernetes#89824. If a cluster is created via kubeadm and External CA mode is used,
kubeadm init
will fail if suppliedkubelet.conf
doesn't have a user matching node registration name, although official docs don't put restrictions on credential name there.Stacktrace:
What did you expect to happen?
kubeadm finalize
works with custom user in kubelet's kubeconfigHow can we reproduce it (as minimally and precisely as possible)?
When
kubelet.conf
is generated use arbitrary name. e.g.default-auth
as suggested in the docs:kubeadm init
stageAnything else we need to know?
No response
Kubernetes version
Cloud provider
OS version
Install tools
Container runtime (CRI) and version (if applicable)
Related plugins (CNI, CSI, ...) and versions (if applicable)
The text was updated successfully, but these errors were encountered: