<@UBAJ7TD53> I need a `getCluster` function that p...
# general
@creamy-potato-29402 I need a
function that provides the kubeconfig. which repo should I file the issue under?
@busy-umbrella-36067 hmm not sure what you mean.. can’t you do something like:
Copy code
// Create an EKS cluster with the default configuration.
const cluster = new eks.Cluster("cluster");

// Export the cluster's kubeconfig.
export const kubeconfig = cluster.kubeconfig;
I think what @busy-umbrella-36067 means is something similar to this https://gist.github.com/geekflyer/b78adab2667d8526a1dd593bc5c844bf#file-gke-ts-L33-L66 to be made part of the eks package. I actually thought along the same lines for the gcp package.
@creamy-potato-29402 the eks cluster is created outside of pulumi
@glamorous-printer-66548 yup. I think AWS has an API call that will output the config for you, so you wouldn't even have to do much
@busy-umbrella-36067 i don’t see getting the kubectl config from either terraform or AWS’s API directly (checked the docs). Where do you get that info from? That being said i think pulumi could add it anyways.
I guess it might be awscli only
yep looks like, this is similar to
gcloud container clusters get-credentials
which generates a kubectl config but is also only part of the CLI
So pretty much exactly your gist @glamorous-printer-66548
@busy-umbrella-36067 ah. Got it. Can you file it against EKS repo itself?
✔️ 1
I like this idea. In fact, it would be nice to try to achieve this for all flavors of hosted clusters. We had to do something dubious and questionable for GKE: https://github.com/pulumi/examples/blob/0cd79d7c10bd5198f13326d2660d84fbd60fa5ed/gcp-ts-gke/cluster.ts#L27