-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Start server with predetermined kubeconfig #1984
Comments
Are you asking about adding a new server to an existing cluster, or creating a new cluster entirely? Are you talking about a k3s server (apiserver), or agent (kubelet)? You might read through the thread here: #1868 (comment) |
@brandond thanks for the response! That issue you refer is extremely useful. I'm currently talking exclusively about the user facing kubeconfig (admin if I'm not mistaken?). Because I plan to run k3s in The second part of the issue is that I want to be able to give users the option to "regenerate" their kubeconfig. But perhaps it's better practice to not hand-out the admin kubeconfig whatshowever, and create a second kubeconfig from it, that is actually distributed to the user? What do you think? To give some context regarding the relevance: Kubescale is developing a platform that will manage the k3s control plane for you, and users type "kubescale up" and their current node is networked (wireguard behind the scenes) and connected as a worker to the cluster. So basically we provide the control plane, you provide the workers 😆 |
You're getting the cart before the horse. If you have access to the CA certs that Kubernetes uses, you can generate as many admin client certs as you want. Just generate the ca certs ahead of time and mount them into your container. You can then use the default admin rbac, or load additional roles and generate client certs to match. |
Hi, my company kubescale is working on a k3s derivative product (cloud k3s control planes).
One of the small challenges we are facing is the kubeconfig:
Is it possible to start a server while you provide the ca data (so we can generate the kubeconfig without accessing the server's file system). Is it sufficient to inject
/var/lib/rancher/k3s/server/tls/client-admin.crt
and/var/lib/rancher/k3s/server/tls/client-admin.key
or will these get overwritten during bootstrapping? If it makes a difference: We run k3s in the HA configuration with a postgresql backend.Perhaps more important for everyone: Is it possible to rotate the kubeconfig?
The text was updated successfully, but these errors were encountered: