interface ClusterAttributes
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Eks.V2.Alpha.ClusterAttributes |
![]() | github.com/aws/aws-cdk-go/awscdkeks-v2alpha/v2#ClusterAttributes |
![]() | software.amazon.awscdk.services.eks.v2.alpha.ClusterAttributes |
![]() | aws_cdk.aws_eks_v2_alpha.ClusterAttributes |
![]() | @aws-cdk/aws-eks-v2-alpha ยป ClusterAttributes |
Attributes for EKS clusters.
Example
import { KubectlV32Layer } from '@aws-cdk/lambda-layer-kubectl-v32';
const handlerRole = iam.Role.fromRoleArn(this, 'HandlerRole', 'arn:aws:iam::123456789012:role/lambda-role');
// get the serivceToken from the custom resource provider
const functionArn = lambda.Function.fromFunctionName(this, 'ProviderOnEventFunc', 'ProviderframeworkonEvent-XXX').functionArn;
const kubectlProvider = eks.KubectlProvider.fromKubectlProviderAttributes(this, 'KubectlProvider', {
serviceToken: functionArn,
role: handlerRole,
});
const cluster = eks.Cluster.fromClusterAttributes(this, 'Cluster', {
clusterName: 'cluster',
kubectlProvider,
});
Properties
Name | Type | Description |
---|---|---|
cluster | string | The physical name of the Cluster. |
cluster | string | The certificate-authority-data for your cluster. |
cluster | string | Amazon Resource Name (ARN) or alias of the customer master key (CMK). |
cluster | string | The API Server endpoint URL. |
cluster | string | The cluster security group that was created by Amazon EKS for the cluster. |
ip | Ip | Specify which IP family is used to assign Kubernetes pod and service IP addresses. |
kubectl | IKubectl | KubectlProvider for issuing kubectl commands. |
kubectl | Kubectl | Options for creating the kubectl provider - a lambda function that executes kubectl and helm against the cluster. |
open | IOpen | An Open ID Connect provider for this cluster that can be used to configure service accounts. |
prune? | boolean | Indicates whether Kubernetes resources added through addManifest() can be automatically pruned. |
security | string[] | Additional security groups associated with this cluster. |
vpc? | IVpc | The VPC in which this Cluster was created. |
clusterName
Type:
string
The physical name of the Cluster.
clusterCertificateAuthorityData?
Type:
string
(optional, default: if not specified cluster.clusterCertificateAuthorityData
will
throw an error)
The certificate-authority-data for your cluster.
clusterEncryptionConfigKeyArn?
Type:
string
(optional, default: if not specified cluster.clusterEncryptionConfigKeyArn
will
throw an error)
Amazon Resource Name (ARN) or alias of the customer master key (CMK).
clusterEndpoint?
Type:
string
(optional, default: if not specified cluster.clusterEndpoint
will throw an error.)
The API Server endpoint URL.
clusterSecurityGroupId?
Type:
string
(optional, default: if not specified cluster.clusterSecurityGroupId
will throw an
error)
The cluster security group that was created by Amazon EKS for the cluster.
ipFamily?
Type:
Ip
(optional, default: IpFamily.IP_V4)
Specify which IP family is used to assign Kubernetes pod and service IP addresses.
kubectlProvider?
Type:
IKubectl
(optional, default: Default CDK provider)
KubectlProvider for issuing kubectl commands.
kubectlProviderOptions?
Type:
Kubectl
(optional)
Options for creating the kubectl provider - a lambda function that executes kubectl
and helm
against the cluster.
If defined, kubectlLayer
is a required property.
If not defined, kubectl provider will not be created by default.
openIdConnectProvider?
Type:
IOpen
(optional, default: if not specified cluster.openIdConnectProvider
and cluster.addServiceAccount
will throw an error.)
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 using new eks.OpenIdConnectProvider
prune?
Type:
boolean
(optional, default: true)
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 apply
operation with the --prune
switch.
securityGroupIds?
Type:
string[]
(optional, default: if not specified, no additional security groups will be
considered in cluster.connections
.)
Additional security groups associated with this cluster.
vpc?
Type:
IVpc
(optional, default: if not specified cluster.vpc
will throw an error)
The VPC in which this Cluster was created.