Hey guys, Im deploying an EKS cluster with pulumi...
# aws
a
Hey guys, Im deploying an EKS cluster with pulumi_aws, and i want to connect my cluster to kubectl as soon as its deployed, how do i output the kubeconfig to my local machine inside the code and not by a command later on?
s
i suppose you could run the
aws eks update-kubeconfig
command as bash inside your python code
a
I did that, but i dont really like that solution because im too dependent on aws credentials. Is there any other way?
p
https://www.pulumi.com/registry/packages/eks/api-docs/cluster/#kubeconfig_nodejs < the cluster object has an output of the kubeconfig, which you could write to a file I guess
s
I did that, but i dont really like that solution because im too dependent on aws credentials. Is there any other way?
AWS auth to EKS is supposed to be dependent on your AWS credentials. It's a feature of EKS so that you don't need to create separate ServiceAccounts for users and all that. Having the Pulumi program automatically update the user's kube config with the same cluster admin credentials can be a security risk.
👍 2