ClusterAttributes
- class aws_cdk.aws_eks_v2_alpha.ClusterAttributes(*, cluster_name, cluster_certificate_authority_data=None, cluster_encryption_config_key_arn=None, cluster_endpoint=None, cluster_security_group_id=None, ip_family=None, kubectl_provider=None, kubectl_provider_options=None, open_id_connect_provider=None, prune=None, security_group_ids=None, vpc=None)
Bases:
object(experimental) Attributes for EKS clusters.
- Parameters:
cluster_name (
str) – (experimental) The physical name of the Cluster.cluster_certificate_authority_data (
Optional[str]) – (experimental) The certificate-authority-data for your cluster. Default: - if not specifiedcluster.clusterCertificateAuthorityDatawill throw an errorcluster_encryption_config_key_arn (
Optional[str]) – (experimental) Amazon Resource Name (ARN) or alias of the customer master key (CMK). Default: - if not specifiedcluster.clusterEncryptionConfigKeyArnwill throw an errorcluster_endpoint (
Optional[str]) – (experimental) The API Server endpoint URL. Default: - if not specifiedcluster.clusterEndpointwill throw an error.cluster_security_group_id (
Optional[str]) – (experimental) The cluster security group that was created by Amazon EKS for the cluster. Default: - if not specifiedcluster.clusterSecurityGroupIdwill throw an errorip_family (
Optional[IpFamily]) – (experimental) Specify which IP family is used to assign Kubernetes pod and service IP addresses. Default: - IpFamily.IP_V4kubectl_provider (
Optional[IKubectlProvider]) – (experimental) KubectlProvider for issuing kubectl commands. Default: - Default CDK providerkubectl_provider_options (
Union[KubectlProviderOptions,Dict[str,Any],None]) – (experimental) Options for creating the kubectl provider - a lambda function that executeskubectlandhelmagainst the cluster. If defined,kubectlLayeris a required property. If not defined, kubectl provider will not be created by default.open_id_connect_provider (
Optional[IOpenIdConnectProvider]) – (experimental) An Open ID Connect provider for this cluster that can be used to configure service accounts. You can either import an existing provider usingiam.OpenIdConnectProvider.fromProviderArn, or create a new provider usingnew eks.OpenIdConnectProviderDefault: - if not specifiedcluster.openIdConnectProviderandcluster.addServiceAccountwill throw an error.prune (
Optional[bool]) – (experimental) 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 thekubectl applyoperation with the--pruneswitch. Default: truesecurity_group_ids (
Optional[Sequence[str]]) – (experimental) Additional security groups associated with this cluster. Default: - if not specified, no additional security groups will be considered incluster.connections.vpc (
Optional[IVpc]) – (experimental) The VPC in which this Cluster was created. Default: - if not specifiedcluster.vpcwill throw an error
- Stability:
experimental
- ExampleMetadata:
infused
Example:
handler_role = iam.Role.from_role_arn(self, "HandlerRole", "arn:aws:iam::123456789012:role/lambda-role") # get the serivceToken from the custom resource provider function_arn = lambda_.Function.from_function_name(self, "ProviderOnEventFunc", "ProviderframeworkonEvent-XXX").function_arn kubectl_provider = eks.KubectlProvider.from_kubectl_provider_attributes(self, "KubectlProvider", service_token=function_arn, role=handler_role ) cluster = eks.Cluster.from_cluster_attributes(self, "Cluster", cluster_name="cluster", kubectl_provider=kubectl_provider )
Attributes
- cluster_certificate_authority_data
(experimental) The certificate-authority-data for your cluster.
- Default:
if not specified
cluster.clusterCertificateAuthorityDatawill
throw an error
- Stability:
experimental
- cluster_encryption_config_key_arn
(experimental) Amazon Resource Name (ARN) or alias of the customer master key (CMK).
- Default:
if not specified
cluster.clusterEncryptionConfigKeyArnwill
throw an error
- Stability:
experimental
- cluster_endpoint
(experimental) The API Server endpoint URL.
- Default:
if not specified
cluster.clusterEndpointwill throw an error.
- Stability:
experimental
- cluster_name
(experimental) The physical name of the Cluster.
- Stability:
experimental
- cluster_security_group_id
(experimental) The cluster security group that was created by Amazon EKS for the cluster.
- Default:
if not specified
cluster.clusterSecurityGroupIdwill throw an
error
- Stability:
experimental
- ip_family
(experimental) Specify which IP family is used to assign Kubernetes pod and service IP addresses.
- Default:
IpFamily.IP_V4
- See:
- Stability:
experimental
- kubectl_provider
(experimental) KubectlProvider for issuing kubectl commands.
- Default:
Default CDK provider
- Stability:
experimental
- kubectl_provider_options
(experimental) Options for creating the kubectl provider - a lambda function that executes
kubectlandhelmagainst the cluster.If defined,
kubectlLayeris a required property.If not defined, kubectl provider will not be created by default.
- Stability:
experimental
- open_id_connect_provider
(experimental) 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.openIdConnectProviderandcluster.addServiceAccountwill throw an error.
- Stability:
experimental
- prune
(experimental) Indicates whether Kubernetes resources added through
addManifest()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 applyoperation with the--pruneswitch.- Default:
true
- Stability:
experimental
- security_group_ids
(experimental) Additional security groups associated with this cluster.
- Default:
if not specified, no additional security groups will be
considered in
cluster.connections.- Stability:
experimental
- vpc
(experimental) The VPC in which this Cluster was created.
- Default:
if not specified
cluster.vpcwill throw an error
- Stability:
experimental