-
Notifications
You must be signed in to change notification settings - Fork 1.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
Support multiple kubeconfigs for a provider #3661
Comments
I see some potential problems in having a short liven kubeconfig for CAPI, because -kubeconfig is part of the contract and it is used in many places to access the workload cluster like e.g. the cluster cache tracker used by many controllers -> the Machine controller when triggering drain, MachineHealthChecks... WRT to additional kubeconfig for |
/milestone Next |
For clarification, the "non-user" kubeconfig that is generated for use by CAPI for a EKS cluster contains a token that is only valid for 15 mins. However, the kubeconfig is regenerated every |
/milestone v0.4.0 |
I can look at this. /assign |
@fabriziopandini @vincepri - would this require a CAEP or is ok to just go ahead and make the clusterctl change? |
The most important thing to me is to document this new feature
If we address the above points, IMO a CAEP is not necessary. |
Thanks @fabriziopandini - i will make sure the documentation is updated as part of the change. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
/lifecycle frozen |
I haven't progressed this, so unassigning and opening it up for others to help. /unassign |
@richardcase: GuidelinesPlease ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met. If this request no longer meets these requirements, the label can be removed In response to this:
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. |
/milestone v1.0 |
@valaparthvi - this is an updated link: https://cluster-api-aws.sigs.k8s.io/topics/eks/creating-a-cluster.html#kubeconfig. If it was me working on it i would do something like this:
The change will probably require:
I would say we need to make sure that by default the command behaves as it does currently (i.e. gets the clustername-kubeconfig secret). |
Awesome! This is exactly what I was looking for. Thanks 🚀 |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
/lifecycle active |
/triage accepted Copying here a comment from the PR for better visibility
|
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/lifecycle frozen |
Removed good first issue, because I don't think this issue is actually a good first issue |
/priority important-longterm |
User Story
As a Cluster API Provider developer I would like Cluster API to support multiple kubeconfigs for the situation where the kubeconfig used by CAPI needs to be different to the kubeconfig that a user would use to connect to the created Kubernetes cluster.
Detailed Description
The implementation of EKS support in CAPA generates 2 kubeconfig files. We did this as the kubeconfig for EKS usually uses the
aws-iam-authenticator
oraws
binary to generate the authentication token. This caused issues with CAPI as those binaries don't exists in the capi images (and shouldn't exist in the images). So we decided to generate 2 different kubeconfigs, one for use by CAPI that has a short lived token (max 15mins validity) and adheres to the current kubeconfig secret naming convention. A second kubeconfig is generated and stored in the management cluster for use by a user and this usesaws-iam-authentictor
or the aws cli and we add a-user
to the name of the secret.Currently this difference is documented in the EKS specific documentation as the feature is experimental.
It would good to allow this distinction in CAPI and define a naming convention etc. And
clusterctl get kubeconfig
should probably return theuser
focused kubeconfig by default with an option to return the one used by capi. Both configs could be the same as well.Anything else you would like to add:
There has been a feature request raised about this in capa about this
/kind feature
The text was updated successfully, but these errors were encountered: