Skip to content

Support multiple kubeconfigs for a provider #3661

Open
@richardcase

Description

@richardcase

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 or aws 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 uses aws-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 the user 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/clusterctlIssues or PRs related to clusterctlhelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions