Hey guys, i'm looking to install load balancer men...
# kubernetes
b
Hey guys, i'm looking to install load balancer mentioned here for my eks cluster - https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html
b
which SDK are you using?
@bitter-application-91815
b
golang
b
I wrote a component resource to install this in nodejs: https://github.com/jaxxstorm/pulumi-aws-loadbalancercontroller you might be able to use it as inspiration for the Go SDK. I'll try and port it if I get some time
🍺 2
b
Thanks @billowy-army-68599 i'll have a go
In your code, Jaxx you assume in the config there is a preexisting OIDC provider to attach to the policies
it's mentioned as step one in the aws notes
Copy code
Create an IAM OIDC provider and associate it with your cluster. Replace the <example values> (including <>) with your own.

eksctl utils associate-iam-oidc-provider \
    --region <region-code> \
    --cluster <my-cluster> \
    --approve
is there a way to do this via the pulumi code, I can't see anything in aws/eks that resembles this ^
b
here's my cluster @bitter-application-91815
Copy code
const cluster = new eks.Cluster(`eks-${stack}`, {
    providerCredentialOpts: kubeconfigOpts,
    name: `lbrlabs-eks-${stack}`,
    vpcId: vpc,
    privateSubnetIds: privateSubnets,
    publicSubnetIds: publicSubnets,
    instanceType: "t2.medium",
    desiredCapacity: 2,
    minSize: 1,
    maxSize: 2,
    createOidcProvider: true, // this is the thing you need

export const clusterName = cluster.eksCluster.name
export const kubeconfig = cluster.kubeconfig
export const clusterOidcProvider = cluster.core.oidcProvider?.url
export const clusterOidcProviderArn = cluster.core.oidcProvider?.arn
});
b
yeah the go sdk doesn't have
Copy code
createOidcProvider: true, // this is the thing you need
so i was going to hand crank it
b
sorry hang on
b
no stress
b
ah yeah you found it already, you create the provider that way. You'll need to specify the cert thumbprint which is here: https://github.com/aws/aws-cdk/pull/6062/files#diff-1b5abdf4656d868abf37929ca321aeb6901593bb7bfcad698927ac4bfa1e4a6eR658
b
sound, will have a go