This message was deleted.
# aws
s
This message was deleted.
b
p
Thanks I'll take a look at that
b
can you share the code you have? I think you’re looking for cluster.core.name
p
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
b
and you’re trying to grab the cluster name?
p
yeah
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
cluster.name
b
Copy code
export const clusterName = cluster.eksCluster.name
p
thanks I'll try that
seems to be compiling
and has the right name
thanks @billowy-army-68599
b
👍