ClusterAttributes Struct
Attributes for EKS clusters.
Example
declare const cluster: eks.Cluster;
declare const asg: autoscaling.AutoScalingGroup;
const importedCluster = eks.Cluster.fromClusterAttributes(this, 'ImportedCluster', {
clusterName: cluster.clusterName,
clusterSecurityGroupId: cluster.clusterSecurityGroupId,
});
importedCluster.connectAutoScalingGroupCapacity(asg, {});
Properties
awscliLayeroptionalILayerVersionawscli_layeroptionalILayerVersionawscliLayeroptionalILayerVersionAwscliLayeroptionalILayerVersionAwscliLayeroptionalILayerVersion#Default: a default layer with the AWS CLI 1.x
The handler expects the layer to include the following executables:
/opt/awscli/aws
clusterCertificateAuthorityDataoptionalstringcluster_certificate_authority_dataoptionalstrclusterCertificateAuthorityDataoptionalStringClusterCertificateAuthorityDataoptionalstringClusterCertificateAuthorityDataoptional*string#Default: if not specified cluster.clusterCertificateAuthorityData will throw an error
clusterEncryptionConfigKeyArnoptionalstringcluster_encryption_config_key_arnoptionalstrclusterEncryptionConfigKeyArnoptionalStringClusterEncryptionConfigKeyArnoptionalstringClusterEncryptionConfigKeyArnoptional*string#Default: if not specified cluster.clusterEncryptionConfigKeyArn will throw an error
clusterEndpointoptionalstringcluster_endpointoptionalstrclusterEndpointoptionalStringClusterEndpointoptionalstringClusterEndpointoptional*string#Default: if not specified cluster.clusterEndpoint will throw an error.
clusterHandlerSecurityGroupIdoptionalstringcluster_handler_security_group_idoptionalstrclusterHandlerSecurityGroupIdoptionalStringClusterHandlerSecurityGroupIdoptionalstringClusterHandlerSecurityGroupIdoptional*string#Default: No security group.
The Cluster Handler's Lambdas are responsible for calling AWS's EKS API.
clusterSecurityGroupIdoptionalstringcluster_security_group_idoptionalstrclusterSecurityGroupIdoptionalStringClusterSecurityGroupIdoptionalstringClusterSecurityGroupIdoptional*string#Default: if not specified cluster.clusterSecurityGroupId will throw an error
ipFamilyoptionalIpFamilyip_familyoptionalIpFamilyipFamilyoptionalIpFamilyIpFamilyoptionalIpFamilyIpFamilyoptionalIpFamily= IpFamily.IP_V4#kubectlEnvironmentoptional{ [key: string]: string }kubectl_environmentoptionaltyping.Mapping[str, str]kubectlEnvironmentoptionalMap<String, String>KubectlEnvironmentoptionalIDictionary<string, string>KubectlEnvironmentoptional*map[string]*string#Default: no additional variables
kubectlLambdaRoleoptionalIRolekubectl_lambda_roleoptionalIRolekubectlLambdaRoleoptionalIRoleKubectlLambdaRoleoptionalIRoleKubectlLambdaRoleoptionalIRole#Default: if not specified, the default role created by a lambda function will be used.
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.
kubectlLayeroptionalILayerVersionkubectl_layeroptionalILayerVersionkubectlLayeroptionalILayerVersionKubectlLayeroptionalILayerVersionKubectlLayeroptionalILayerVersion#Default: No default layer will be provided
notes
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.
The handler expects the layer to include the following executables:
/opt/helm/helm
/opt/kubectl/kubectl
kubectlMemoryoptionalSizekubectl_memoryoptionalSizekubectlMemoryoptionalSizeKubectlMemoryoptionalSizeKubectlMemoryoptionalSize= Size.gibibytes(1)#kubectlPrivateSubnetIdsoptionalstring[]kubectl_private_subnet_idsoptionaltyping.List[str]kubectlPrivateSubnetIdsoptionalList<String>KubectlPrivateSubnetIdsoptionalstring[]KubectlPrivateSubnetIdsoptional*[]*string#Default: k8s endpoint is expected to be accessible publicly
If not specified, the k8s endpoint is expected to be accessible publicly.
kubectlProvideroptionalIKubectlProviderkubectl_provideroptionalIKubectlProviderkubectlProvideroptionalIKubectlProviderKubectlProvideroptionalIKubectlProviderKubectlProvideroptionalIKubectlProvider#Default: Default CDK provider
kubectlRoleArnoptionalstringkubectl_role_arnoptionalstrkubectlRoleArnoptionalStringKubectlRoleArnoptionalstringKubectlRoleArnoptional*string#Default: if not specified, it not be possible to issue kubectl commands against an imported cluster.
kubectlSecurityGroupIdoptionalstringkubectl_security_group_idoptionalstrkubectlSecurityGroupIdoptionalStringKubectlSecurityGroupIdoptionalstringKubectlSecurityGroupIdoptional*string#Default: k8s endpoint is expected to be accessible publicly
If not specified, the k8s endpoint is expected to be accessible publicly.
onEventLayeroptionalILayerVersionon_event_layeroptionalILayerVersiononEventLayeroptionalILayerVersionOnEventLayeroptionalILayerVersionOnEventLayeroptionalILayerVersion#Default: a layer bundled with this module.
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
openIdConnectProvideroptionalIOpenIdConnectProvideropen_id_connect_provideroptionalIOpenIdConnectProvideropenIdConnectProvideroptionalIOpenIdConnectProviderOpenIdConnectProvideroptionalIOpenIdConnectProviderOpenIdConnectProvideroptionalIOpenIdConnectProvider#Default: if not specified cluster.openIdConnectProvider and cluster.addServiceAccount will throw an error.
You can either import an existing provider using iam.OpenIdConnectProvider.fromProviderArn, or create a new provider using new eks.OpenIdConnectProvider
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.
securityGroupIdsoptionalstring[]security_group_idsoptionaltyping.List[str]securityGroupIdsoptionalList<String>SecurityGroupIdsoptionalstring[]SecurityGroupIdsoptional*[]*string#Default: if not specified, no additional security groups will be considered in cluster.connections.