Interface ClusterAttributes
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
ClusterAttributes.Jsii$Proxy
Example:
IRole handlerRole = Role.fromRoleArn(this, "HandlerRole", "arn:aws:iam::123456789012:role/lambda-role");
// get the serivceToken from the custom resource provider
String functionArn = Function.fromFunctionName(this, "ProviderOnEventFunc", "ProviderframeworkonEvent-XXX").getFunctionArn();
IKubectlProvider kubectlProvider = KubectlProvider.fromKubectlProviderAttributes(this, "KubectlProvider", KubectlProviderAttributes.builder()
.serviceToken(functionArn)
.role(handlerRole)
.build());
ICluster cluster = Cluster.fromClusterAttributes(this, "Cluster", ClusterAttributes.builder()
.clusterName("cluster")
.kubectlProvider(kubectlProvider)
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forClusterAttributesstatic final classAn implementation forClusterAttributes -
Method Summary
Modifier and TypeMethodDescriptionstatic ClusterAttributes.Builderbuilder()default StringThe certificate-authority-data for your cluster.default StringAmazon Resource Name (ARN) or alias of the customer master key (CMK).default StringThe API Server endpoint URL.The physical name of the Cluster.default StringThe cluster security group that was created by Amazon EKS for the cluster.default IpFamilySpecify which IP family is used to assign Kubernetes pod and service IP addresses.default IKubectlProviderKubectlProvider for issuing kubectl commands.default KubectlProviderOptionsOptions for creating the kubectl provider - a lambda function that executeskubectlandhelmagainst the cluster.default IOpenIdConnectProviderAn Open ID Connect provider for this cluster that can be used to configure service accounts.default BooleangetPrune()Indicates whether Kubernetes resources added throughaddManifest()can be automatically pruned.Additional security groups associated with this cluster.default IVpcgetVpc()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. -
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.
-
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:
-
getKubectlProvider
KubectlProvider for issuing kubectl commands.Default: - Default CDK provider
-
getKubectlProviderOptions
Options for creating the kubectl provider - a lambda function that executeskubectlandhelmagainst the cluster.If defined,
kubectlLayeris a required property.Default: - kubectl provider will not be created by default.
-
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.OpenIdConnectProviderDefault: - 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 applyoperation with the--pruneswitch.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.BuilderofClusterAttributes
-