ComputeConfig Struct
Options for configuring EKS Auto Mode compute settings.
When enabled, EKS will automatically manage compute resources like node groups and Fargate profiles.
| Source | aws-eks-v2/lib/cluster.ts |
|---|---|
| Type last changed |
Example
ts
const cluster = new eks.Cluster(this, 'EksAutoCluster', {
version: eks.KubernetesVersion.V1_37,
defaultCapacityType: eks.DefaultCapacityType.AUTOMODE,
compute: {
nodePools: ['system', 'general-purpose'],
},
});
python
cluster = eks.Cluster(self, "EksAutoCluster",
version=eks.KubernetesVersion.V1_37,
default_capacity_type=eks.DefaultCapacityType.AUTOMODE,
compute=eks.ComputeConfig(
node_pools=["system", "general-purpose"]
)
)
java
Cluster cluster = Cluster.Builder.create(this, "EksAutoCluster")
.version(KubernetesVersion.V1_37)
.defaultCapacityType(DefaultCapacityType.AUTOMODE)
.compute(ComputeConfig.builder()
.nodePools(List.of("system", "general-purpose"))
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
var cluster = new Cluster(this, "EksAutoCluster", new ClusterProps {
Version = KubernetesVersion.V1_37,
DefaultCapacityType = DefaultCapacityType.AUTOMODE,
Compute = new ComputeConfig {
NodePools = new [] { "system", "general-purpose" }
}
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
cluster := eks.NewCluster(this, jsii.String("EksAutoCluster"), &ClusterProps{
Version: eks.KubernetesVersion_V1_37(),
DefaultCapacityType: eks.DefaultCapacityType_AUTOMODE,
Compute: &ComputeConfig{
NodePools: []*string{
jsii.String("system"),
jsii.String("general-purpose"),
},
},
})
Properties
nodePoolsoptionalstring[]node_poolsoptionaltyping.List[str]nodePoolsoptionalList<String>NodePoolsoptionalstring[]NodePoolsoptional*[]*string #Names of nodePools to include in Auto Mode.
Default: ['system', 'general-purpose']
You cannot modify the built in system and general-purpose node pools. You can only enable or disable them. Node pool values are case-sensitive and must be general-purpose and/or system.