-
Notifications
You must be signed in to change notification settings - Fork 715
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
Ability to configure user and cluster name in AdminKubeConfigFile #416
Comments
/cc @fisherxu |
@shashidharatd Have send a pr :) |
Hi, @pipejakob @luxas, As said in this issue, I think we should make |
My comments on #52470 |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
kubernetes/kubernetes#55901 addresses. |
@timothysc could you please exlain how kubernetes/kubernetes#55901 addresses custom username/cluster name config ? |
@ps-aux Sorry wrong link. kubernetes/kubernetes#52470 - addressed both, but I'm not sold on kubeadm touching multi-user space. IMO this is policy and can/should be done separately. As a result, I'm closing this issue. If folks have a compelling argument on user override that requires putting it into kubeadm, please open a new issue that is scoped to just that problem. |
Is there any option for |
As I said before I created a config file and it works. I don't like the fact it's apiVersion is alpha. |
this is how k8s features work, alpha -> beta -> GA. there is a command called |
@neolit123 Nice information, thanks. That page says that using an alpha version may be buggy and should not be used in long living clusters, that's the thing I am concerned about. I dumped a config file with |
moving the config away from alpha is a slow process. we expect the config to be beta in 1.12.
you can extract only the parts that you need from |
Got it, thanks! |
Hi! I just bumped into this issue when I tried to do the same thing as OP, i.e., build two clusters with kubeadm then configure kubectl to control both of them. When you provide both config files to kubectl (for example, by putting both in $KUBECONFIG) it can distinguish between both clusters because they can have different names, but because both admin users have the same name kubectl picks only one and uses that so it can access only one of the two clusters. It would be very useful to be able to specify the admin user name when the cluster is built since then kubectl could control multiple kubeadm-created clusters. @timothysc could you please elaborate on your comment "I'm not sold on kubeadm touching multi-user space. IMO this is policy and can/should be done separately."? How can I do this separately? It seems like I get a user named I'd be willing to look at making a new PR with just the user name part of kubernetes/kubernetes#52470 but don't want to waste my time if it will get shot down. Thanks! |
hi, in kubeadm 1.20 (to be released) we extended the command this allows you to generate kubeconfig files for different clusters / users / orgs. we cannot backport this extension to older releases, but technically you could use the 1.20 binary to generate kubeconfig for older clusters. |
hi @neolit123 , thanks for the info! That looks like an improvement but I don't see anything about setting the admin user name. I'm still learning my way around k8s, am I missing something? It looks like I'll still be unable to init a cluster with an admin user named anything but Thanks again! |
the new command allows so you could do this command ClusterConfiguration can be used for the:
|
Thank you @neolit123, that works! Back to #416 (comment) :
I think it would be a better user experience to specify the default admin user name (like we can specify the cluster name) instead of having to create a second user. Another potential approach would be to have the default admin name be based on the cluster name, e.g., clusterName+"-admin". Then if the client changed the cluster name the admin name would track that change. WDYT? |
this idea was rejected before, but if you feel strongly about it, please log a new issue with a detailed description and link to this old ticket. it can be discussed for v1beta3. thanks. |
When we bring up k8s cluster using
kubeadm
, the cluster is configured with default cluster-name ofkubernetes
and user namekubernetes-admin
in admin.conf kubeconfig file.When user wants to deploy multiple clusters and manage them from same kubeconfig file by merging the kubeconfigs of multiple deployments, there will be duplicate user-names but different users, which makes it difficult to merge the kubeconfigs.
So we need the ability in
kubeadm
to customize the cluster and user-names written toadmin.conf
/cc @pipejakob @luxas
The text was updated successfully, but these errors were encountered: