Skip to content

Cluster

Source: src/AWS/EKS/Cluster.ts

An Amazon EKS cluster with support for EKS Auto Mode settings.

const cluster = yield* Cluster("AppCluster", {
roleArn: clusterRole.roleArn,
resourcesVpcConfig: {
subnetIds: network.privateSubnetIds,
endpointPublicAccess: true,
endpointPrivateAccess: true,
},
accessConfig: {
authenticationMode: "API",
},
computeConfig: {
enabled: true,
nodeRoleArn: nodeRole.roleArn,
nodePools: ["system", "general-purpose"],
},
kubernetesNetworkConfig: {
elasticLoadBalancing: { enabled: true },
},
storageConfig: {
blockStorage: { enabled: true },
},
});