Skip to content
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

Use the cluster name in cluster.yaml in admin.conf #49

Closed
rsdcastro opened this issue Apr 12, 2018 · 11 comments
Closed

Use the cluster name in cluster.yaml in admin.conf #49

rsdcastro opened this issue Apr 12, 2018 · 11 comments

Comments

@rsdcastro
Copy link

From @karan on March 6, 2018 17:29

Currently the cluster config is created with cluster name as kubernetes. There is a cluster name in the cluster.yaml metadata.name. We should start using that name for the cluster so tools can be made to target any cluster in kubeconfig file.

Copied from original issue: kubernetes-retired/kube-deploy#636

@rsdcastro
Copy link
Author

From @karan on March 6, 2018 17:36

cc @jessicaochen @rsdcastro - If no objections, I can start to look into this.

@rsdcastro
Copy link
Author

It does make sense to me.

@rsdcastro
Copy link
Author

From @karan on March 6, 2018 17:54

Seems like the cluster name is hardcoded in kubeadm:

https://github.com/kubernetes/kubernetes/blob/999c2ae8716b76099b30da4cea973d0e2c737f77/cmd/kubeadm/app/phases/kubeconfig/kubeconfig.go#L191

There's been a PR to make it configurable, but it's been stale: kubernetes/kubernetes#52470

@rsdcastro
Copy link
Author

Perhaps we can work on a new PR that focus on the cluster name to avoid the contention on the other point (user admins)?

@rsdcastro
Copy link
Author

From @jessicaochen on March 6, 2018 18:9

I may be wrong but I think it is just the name in the kubeconfig file to reference the cluster. If you change the name in the kubeconfig file or set a new one with the name your want (https://kubernetes-v1-4.github.io/docs/user-guide/kubectl/kubectl_config_set-cluster/), you can still address the same cluster.

In that way, it really does not matter what kubeadm happens to dump as the cluster name on the master.

@rsdcastro
Copy link
Author

From @karan on March 6, 2018 18:15

You are right @jessicaochen. I tried this with s/kubernetes/testcluster on my local kubeconfig file. I don't think we should be doing this in the final product, it's just hacky, and error prone. Instead the cluster name really just should be an option that kubeadm uses to save the original file.

@rsdcastro
Copy link
Author

From @jessicaochen on March 6, 2018 18:19

I guess it depends on how important urgent this change is. Whether we want to wait for kubeadm to do it or we want an interim solution.

@rsdcastro
Copy link
Author

From @karan on March 6, 2018 22:18

/label cluster-api

@rsdcastro
Copy link
Author

From @karan on March 7, 2018 16:55

As a prototype we could live with managing a single cluster (or doing something hacky), but at least for an alpha/MVP, a good approach is to support cluster names.

I've already sent them a PR for it.

@roberthbailey
Copy link
Contributor

Cluster name is a provider specific implementation.

/close

@k8s-ci-robot
Copy link
Contributor

@roberthbailey: Closing this issue.

In response to this:

Cluster name is a provider specific implementation.

/close

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.

chuckha pushed a commit to chuckha/cluster-api that referenced this issue Oct 2, 2019
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

No branches or pull requests

4 participants