Interface ClusterAttributes
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
ClusterAttributes.Jsii$Proxy
Example:
Cluster cluster; AutoScalingGroup asg; ICluster importedCluster = Cluster.fromClusterAttributes(this, "ImportedCluster", ClusterAttributes.builder() .clusterName(cluster.getClusterName()) .clusterSecurityGroupId(cluster.getClusterSecurityGroupId()) .build()); importedCluster.connectAutoScalingGroupCapacity(asg, AutoScalingGroupOptions.builder().build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forClusterAttributes
static final class
An implementation forClusterAttributes
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClusterAttributes.Builder
builder()
default ILayerVersion
An AWS Lambda layer that contains theaws
CLI.default String
The certificate-authority-data for your cluster.default String
Amazon Resource Name (ARN) or alias of the customer master key (CMK).default String
The API Server endpoint URL.default String
A security group id to associate with the Cluster Handler's Lambdas.The physical name of the Cluster.default String
The cluster security group that was created by Amazon EKS for the cluster.default IpFamily
Specify which IP family is used to assign Kubernetes pod and service IP addresses.Environment variables to use when runningkubectl
against this cluster.default IRole
An IAM role that can perform kubectl operations against this cluster.default ILayerVersion
An AWS Lambda Layer which includeskubectl
and Helm.default Size
Amount of memory to allocate to the provider's lambda function.Subnets to host thekubectl
compute resources.default IKubectlProvider
KubectlProvider for issuing kubectl commands.default String
An IAM role with cluster administrator and "system:masters" permissions.default String
A security group to use forkubectl
execution.default ILayerVersion
An AWS Lambda Layer which includes the NPM dependencyproxy-agent
.default IOpenIdConnectProvider
An Open ID Connect provider for this cluster that can be used to configure service accounts.default Boolean
getPrune()
Indicates whether Kubernetes resources added throughaddManifest()
can be automatically pruned.Additional security groups associated with this cluster.default IVpc
getVpc()
The VPC in which this Cluster was created.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getClusterName
The physical name of the Cluster. -
getAwscliLayer
An AWS Lambda layer that contains theaws
CLI.The handler expects the layer to include the following executables:
/opt/awscli/aws
Default: - a default layer with the AWS CLI 1.x
-
getClusterCertificateAuthorityData
The certificate-authority-data for your cluster.Default: - if not specified `cluster.clusterCertificateAuthorityData` will throw an error
-
getClusterEncryptionConfigKeyArn
Amazon Resource Name (ARN) or alias of the customer master key (CMK).Default: - if not specified `cluster.clusterEncryptionConfigKeyArn` will throw an error
-
getClusterEndpoint
The API Server endpoint URL.Default: - if not specified `cluster.clusterEndpoint` will throw an error.
-
getClusterHandlerSecurityGroupId
A security group id to associate with the Cluster Handler's Lambdas.The Cluster Handler's Lambdas are responsible for calling AWS's EKS API.
Default: - No security group.
-
getClusterSecurityGroupId
The cluster security group that was created by Amazon EKS for the cluster.Default: - if not specified `cluster.clusterSecurityGroupId` will throw an error
-
getIpFamily
Specify which IP family is used to assign Kubernetes pod and service IP addresses.Default: - IpFamily.IP_V4
- See Also:
-
getKubectlEnvironment
Environment variables to use when runningkubectl
against this cluster.Default: - no additional variables
-
getKubectlLambdaRole
An IAM role that can perform kubectl operations against this cluster.The role should be mapped to the
system:masters
Kubernetes RBAC role.This role is directly passed to the lambda handler that sends Kube Ctl commands to the cluster.
Default: - if not specified, the default role created by a lambda function will be used.
-
getKubectlLayer
An AWS Lambda Layer which includeskubectl
and Helm.This layer is used by the kubectl handler to apply manifests and install helm charts. You must pick an appropriate releases of one of the
@aws-cdk/layer-kubectl-vXX
packages, that works with the version of Kubernetes you have chosen. If you don't supply this valuekubectl
1.20 will be used, but that version is most likely too old.The handler expects the layer to include the following executables:
/opt/helm/helm /opt/kubectl/kubectl
Default: - a default layer with Kubectl 1.20 and helm 3.8.
-
getKubectlMemory
Amount of memory to allocate to the provider's lambda function.Default: Size.gibibytes(1)
-
getKubectlPrivateSubnetIds
Subnets to host thekubectl
compute resources.If not specified, the k8s endpoint is expected to be accessible publicly.
Default: - k8s endpoint is expected to be accessible publicly
-
getKubectlProvider
KubectlProvider for issuing kubectl commands.Default: - Default CDK provider
-
getKubectlRoleArn
An IAM role with cluster administrator and "system:masters" permissions.Default: - if not specified, it not be possible to issue `kubectl` commands against an imported cluster.
-
getKubectlSecurityGroupId
A security group to use forkubectl
execution.If not specified, the k8s endpoint is expected to be accessible publicly.
Default: - k8s endpoint is expected to be accessible publicly
-
getOnEventLayer
An AWS Lambda Layer which includes the NPM dependencyproxy-agent
.This layer is used by the onEvent handler to route AWS SDK requests through a proxy.
The handler expects the layer to include the following node_modules:
proxy-agent
Default: - a layer bundled with this module.
-
getOpenIdConnectProvider
An Open ID Connect provider for this cluster that can be used to configure service accounts.You can either import an existing provider using
iam.OpenIdConnectProvider.fromProviderArn
, or create a new provider usingnew eks.OpenIdConnectProvider
Default: - if not specified `cluster.openIdConnectProvider` and `cluster.addServiceAccount` will throw an error.
-
getPrune
Indicates whether Kubernetes resources added throughaddManifest()
can be automatically pruned.When this is enabled (default), prune labels will be allocated and injected to each resource. These labels will then be used when issuing the
kubectl apply
operation with the--prune
switch.Default: true
-
getSecurityGroupIds
Additional security groups associated with this cluster.Default: - if not specified, no additional security groups will be considered in `cluster.connections`.
-
getVpc
The VPC in which this Cluster was created.Default: - if not specified `cluster.vpc` will throw an error
-
builder
- Returns:
- a
ClusterAttributes.Builder
ofClusterAttributes
-