pulumi-aws icon indicating copy to clipboard operation
pulumi-aws copied to clipboard

Method for generating kubeconfig/provider from GetCluster result

Open Dysproz opened this issue 2 years ago • 4 comments

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

Currently using GetCluster method (https://www.pulumi.com/registry/packages/aws/api-docs/eks/getcluster/) we get only basic information about EKS cluster which may be used later to create kubeconfig (and then provider based on it). However, creating a kubeconfig is a pretty manual process and requires to specify the whole file by yourself. I'd be easier to have a method from pulumi or a parameter of cluster results that creates a kubeconfig automatically based on gathered data of the EKS cluster. Or even going further method that creates provider based on get cluster result.

Affected area/feature

AWS classic package; EKS module

Dysproz avatar Jul 13 '22 10:07 Dysproz

@pierskarsenbarg I've created a feature request regarding kubeconfig that we've been talking about yesterday :)

Dysproz avatar Jul 13 '22 10:07 Dysproz

Thanks for writing this up. I've put this onto our planning board for consideration in future iterations.

This might indeed be a good fit for the EKS component package instead depending on how much of a special-case the implementation is.

If there's interest in contributing this feature please let us know and we can support the implementation design process to help find the best approach.

danielrbradley avatar Jul 14 '22 14:07 danielrbradley

Another vote up for this feature !

jasminen avatar Feb 20 '24 10:02 jasminen

This feature is essential for proper automation using Pulumi. The only package with this support is pulumi-eks, which already has Output kubeconfig. However, to use this package, you must create the EKS cluster, which prevents you from creating a kubeconfig of an already created cluster. Furthermore, the pulumi-eks or pulumi-awsx packages do not allow us to create an EKS cluster, which we can now build using pulumi-aws in a stable and very flexible way.

firemanxbr avatar Mar 14 '24 07:03 firemanxbr