https://pulumi.com logo
Title
b

bumpy-summer-9075

04/27/2021, 6:33 PM
Is there a way to get a K8S provider for a non-crosswalk-generated EKS cluster?
const eksCluster = aws.eks.Cluster.get('myCluster', clusterName);
works, but it does not provide a
.provider
attribute to pass to K8S resources
b

broad-dog-22463

04/27/2021, 6:36 PM
you need to construct the Provider yourself - let me get you an example
🙏 1
here is an example in Go that you will be able to use to help you https://github.com/pulumi/examples/blob/master/aws-go-eks/main.go#L143
notice you need to construct a kubernetes Provider and then set the kubeconfig as part of it to allow interaction with the kubernetes cluster
b

bumpy-summer-9075

04/27/2021, 6:39 PM
There's a hard dependency on
aws-iam-authenticator
, is that going to work without kubectl? https://github.com/pulumi/examples/blob/master/aws-go-eks/main.go#L250
Only one way to make sure 😉
Thanks @broad-dog-22463
b

broad-dog-22463

04/27/2021, 6:40 PM
nps!
b

billowy-army-68599

04/27/2021, 6:59 PM
@bumpy-summer-9075 you can use
aws eks get-token
instead
❤️ 1
b

bumpy-summer-9075

04/27/2021, 7:01 PM
This is what I went for, posting here in case someone stumbles on it.
w

white-balloon-205

04/28/2021, 12:30 AM
FWIW - https://github.com/pulumi/pulumi-eks/issues/11 is tracking adding this feature to the EKS package.
👍 1
b

bumpy-summer-9075

04/28/2021, 12:44 AM
I might look into contributing it, sounds like a good first issue. That being said, my main concern is whether to go with iam-authenticator, or going the
aws eks get-token
route
b

billowy-army-68599

04/28/2021, 2:10 AM
go with the eks get-token route please
👍 1