I'm having fun trying to make my EKS cluster work ...
# aws
I'm having fun trying to make my EKS cluster work with ALB. There's some docs here https://docs.aws.amazon.com/eks/latest/userguide/aws-load-balancer-controller.html I'm adding in the roles I need for that and installing the controller from the helm chart in the same pulumi typescript script which creates the EKS cluster. When I try to get the name of the cluster to pass into the helm chart using
I get a compile error saying:
Copy code
TSError: ⨯ Unable to compile TypeScript:
    index.ts(427,24): error TS2339: Property 'name' does not exist on type 'Cluster'.
but looking in the docs https://www.pulumi.com/registry/packages/eks/api-docs/cluster/#name_nodejs it has name as an input and all inputs are outputs, so why doesn't that work. To prove it wasn't some other issue, like the cluster var being the wrong type of object or something I tried
and then the TS compiles fine but obviously the ClusterName is set wrong in the helm chart.
Thanks I'll take a look at that
can you share the code you have? I think you’re looking for cluster.core.name
Copy code
// Create an EKS cluster
const cluster = new eks.Cluster(nam, {
        vpcId: vpcid,
        privateSubnetIds: [ privsub[0], privsub[1] ],
        publicSubnetIds: [ pubsub[0], pubsub[1] ],
        clusterSecurityGroup: sg,
        endpointPrivateAccess: true,
        endpointPublicAccess: false,
        enabledClusterLogTypes: ["api", "audit", "authenticator", "controllerManager", "scheduler"],
        nodeAssociatePublicIpAddress: false,
        instanceType: "t3a.medium",
        maxSize: 10,
        minSize: 2,
        serviceRole: serviceRole,
        createOidcProvider: true,
        useDefaultVpcCni: true,
        roleMappings: [
                        groups: [ "system:masters" ],
                        roleArn: adminVMrole.arn,
                        username: "admin",
That's the call to the eks.cluster function
and you’re trying to grab the cluster name?
Copy code
// deploy the helm chart for the ALB Controller
const albController = new k8s.helm.v3.Release("albController", {
        repositoryOpts: {           
                repo: "<https://aws.github.io/eks-charts>",
        chart: "aws-load-balancer-controller",
        namespace: "kube-system",   
        values: {                   
                image: {            
                        reposistory: "<http://602401143452.dkr.ecr.us-east-2.amazonaws.com/amazon/aws-load-balancer-controller|602401143452.dkr.ecr.us-east-2.amazonaws.com/amazon/aws-load-balancer-controller>",
                clusterName: cluster.name,
                serviceAccount: {   
                        annotations: {
                                "<http://eks.amazonaws.com/role-arn|eks.amazonaws.com/role-arn>": albControllerRole.arn,
}, { provider: cluster.provider });
that's the helm.Release call
Copy code
export const clusterName = cluster.eksCluster.name
thanks I'll try that
seems to be compiling
and has the right name
thanks @billowy-army-68599