This message was deleted.
# general
s
This message was deleted.
b
@melodic-horse-69239 are you using AWS profiles?
m
yes
but for pulumi i use environment access key and secret key as well as AWS_PROFILE set to the correct sso profile
(and session token ofc)
b
are you setting it in your EKS code though?
m
ok, i have checked what kubeconfig the aws cli generates and it differs in one point. the user exec to get the token has a env object which sets AWS_PROFILE to the sso profile name the pulumi generated kubeconfig doesn’t have that env
b
Copy code
const kubeconfigOpts: eks.KubeconfigOptions = {profileName: profile};

const cluster = new eks.Cluster(name, {
    providerCredentialOpts: kubeconfigOpts,
    vpcId: vpc.id,
    privateSubnetIds: vpc.privateSubnetIds,
    publicSubnetIds: vpc.publicSubnetIds,
    instanceType: "t2.medium",
    desiredCapacity: 2,
    minSize: 1,
    maxSize: 2,
    createOidcProvider: true,
    tags: {
        Owner: "lbriggs",
        owner: "lbriggs",
    }
});
you need to set your
kubeconfigOpts
like this
m
ok, let me check, that should be the problem then
that worked, huge thanks 🙂