https://pulumi.com logo
#kubernetes
Title
# kubernetes
b

bored-table-20691

05/25/2021, 1:19 AM
Is this the best way to get the kubeconfig from an EKS cluster in Go to pass to another provider? https://github.com/pulumi/examples/blob/e3b4e1734fc827451e3bccf623468c320015a084/aws-go-eks/main.go#L143
b

billowy-army-68599

05/25/2021, 1:28 AM
if you're not using our eks provider, yes. I'd highly recommend using pulumi-eks though, it exports the kubeconfig for you
b

bored-table-20691

05/25/2021, 2:05 AM
Thanks - I had a feeling this wasn’t right, but I couldn’t find the docs for pulumi-EKS quickly.
@billowy-army-68599 is there an equivalent fir GetCluster or LookupCluster for the pulumi-EKS provider?
b

billowy-army-68599

05/25/2021, 3:28 AM
no for that provider, you'll need to use
pulumi-aws
to do that lookup, the EKS provider is a component, not a provider
eks uses the aws provider
b

bored-table-20691

05/25/2021, 3:30 AM
I see. And presumably if I use pulumi-aws then I have to manually construct the kubeconfig. I’m mostly trying to take an existing EKS cluster (which I don’t want to import into pulumi just yet) and use their info as the base for the Kubernetes provider. Just trying to figure out the best way to go from an existing EKS cluster to a Kubeconfig/Kubernetes provider
b

billowy-army-68599

05/25/2021, 3:35 AM
ah, in that case, aws is your best bet
b

bored-table-20691

05/25/2021, 3:36 AM
Thanks, appreciate the quick and late replies
4 Views