ICluster Interface
An EKS cluster.
Properties
authenticationModemay be undefinedAuthenticationModeauthentication_modemay be undefinedAuthenticationModeauthenticationModemay be undefinedAuthenticationModeAuthenticationModemay be undefinedAuthenticationModeAuthenticationModemay be undefinedAuthenticationMode= AuthenticationMode.CONFIG_MAP#awscliLayermay be undefinedILayerVersionawscli_layermay be undefinedILayerVersionawscliLayermay be undefinedILayerVersionAwscliLayermay be undefinedILayerVersionAwscliLayermay be undefinedILayerVersion#If not defined, a default layer will be used containing the AWS CLI 1.x.
clusterCertificateAuthorityDatastringcluster_certificate_authority_datastrclusterCertificateAuthorityDataStringClusterCertificateAuthorityDatastringClusterCertificateAuthorityData*string#clusterEncryptionConfigKeyArnstringcluster_encryption_config_key_arnstrclusterEncryptionConfigKeyArnStringClusterEncryptionConfigKeyArnstringClusterEncryptionConfigKeyArn*string#clusterEndpointstringcluster_endpointstrclusterEndpointStringClusterEndpointstringClusterEndpoint*string#clusterHandlerSecurityGroupmay be undefinedISecurityGroupcluster_handler_security_groupmay be undefinedISecurityGroupclusterHandlerSecurityGroupmay be undefinedISecurityGroupClusterHandlerSecurityGroupmay be undefinedISecurityGroupClusterHandlerSecurityGroupmay be undefinedISecurityGroup#Default: No security group.
The Cluster Handler's Lambdas are responsible for calling AWS's EKS API.
Requires placeClusterHandlerInVpc to be set to true.
clusterRefClusterReferencecluster_refClusterReferenceclusterRefClusterReferenceClusterRefClusterReferenceClusterRefClusterReference#clusterSecurityGroupISecurityGroupcluster_security_groupISecurityGroupclusterSecurityGroupISecurityGroupClusterSecurityGroupISecurityGroupClusterSecurityGroupISecurityGroup#clusterSecurityGroupIdstringcluster_security_group_idstrclusterSecurityGroupIdStringClusterSecurityGroupIdstringClusterSecurityGroupId*string#connectionsConnectionsconnectionsConnectionsconnectionsConnectionsConnectionsConnectionsConnectionsConnections#eksPodIdentityAgentmay be undefinedIAddoneks_pod_identity_agentmay be undefinedIAddoneksPodIdentityAgentmay be undefinedIAddonEksPodIdentityAgentmay be undefinedIAddonEksPodIdentityAgentmay be undefinedIAddon#notes
The EKS Pod Identity Agent is responsible for managing the temporary credentials used by pods in the cluster to access AWS resources. It runs as a DaemonSet on each node and provides the necessary credentials to the pods based on their associated service account.
This property returns the CfnAddon resource representing the EKS Pod Identity Agent addon. If the addon has not been created yet, it will be created and returned.
envResourceEnvironmentenvResourceEnvironmentenvResourceEnvironmentEnvResourceEnvironmentEnvResourceEnvironment#notes
For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.
ipFamilymay be undefinedIpFamilyip_familymay be undefinedIpFamilyipFamilymay be undefinedIpFamilyIpFamilymay be undefinedIpFamilyIpFamilymay be undefinedIpFamily= IpFamily.IP_V4#kubectlEnvironmentmay be undefined{ [key: string]: string }kubectl_environmentmay be undefinedtyping.Mapping[str, str]kubectlEnvironmentmay be undefinedMap<String, String>KubectlEnvironmentmay be undefinedIDictionary<string, string>KubectlEnvironmentmay be undefined*map[string]*string#kubectlLambdaRolemay be undefinedIRolekubectl_lambda_rolemay be undefinedIRolekubectlLambdaRolemay be undefinedIRoleKubectlLambdaRolemay be undefinedIRoleKubectlLambdaRolemay be undefinedIRole#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.
kubectlLayermay be undefinedILayerVersionkubectl_layermay be undefinedILayerVersionkubectlLayermay be undefinedILayerVersionKubectlLayermay be undefinedILayerVersionKubectlLayermay be undefinedILayerVersion#kubectlMemorymay be undefinedSizekubectl_memorymay be undefinedSizekubectlMemorymay be undefinedSizeKubectlMemorymay be undefinedSizeKubectlMemorymay be undefinedSize#kubectlPrivateSubnetsmay be undefinedISubnet[]kubectl_private_subnetsmay be undefinedtyping.List[ISubnet]kubectlPrivateSubnetsmay be undefinedList<ISubnet>KubectlPrivateSubnetsmay be undefinedISubnet[]KubectlPrivateSubnetsmay be undefined*[]ISubnet#If this is undefined, the k8s endpoint is expected to be accessible publicly.
kubectlProvidermay be undefinedIKubectlProviderkubectl_providermay be undefinedIKubectlProviderkubectlProvidermay be undefinedIKubectlProviderKubectlProvidermay be undefinedIKubectlProviderKubectlProvidermay be undefinedIKubectlProvider#If not defined, a default provider will be used
kubectlRolemay be undefinedIRolekubectl_rolemay be undefinedIRolekubectlRolemay be undefinedIRoleKubectlRolemay be undefinedIRoleKubectlRolemay be undefinedIRole#The role should be mapped to the system:masters Kubernetes RBAC role.
kubectlSecurityGroupmay be undefinedISecurityGroupkubectl_security_groupmay be undefinedISecurityGroupkubectlSecurityGroupmay be undefinedISecurityGroupKubectlSecurityGroupmay be undefinedISecurityGroupKubectlSecurityGroupmay be undefinedISecurityGroup#If this is undefined, the k8s endpoint is expected to be accessible publicly.
onEventLayermay be undefinedILayerVersionon_event_layermay be undefinedILayerVersiononEventLayermay be undefinedILayerVersionOnEventLayermay be undefinedILayerVersionOnEventLayermay be undefinedILayerVersion#If not defined, a default layer will be used.
openIdConnectProviderIOpenIdConnectProvideropen_id_connect_providerIOpenIdConnectProvideropenIdConnectProviderIOpenIdConnectProviderOpenIdConnectProviderIOpenIdConnectProviderOpenIdConnectProviderIOpenIdConnectProvider#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.
Methods
addCdk8sChart(id: string, chart: Construct, options?: KubernetesManifestOptions): KubernetesManifestdef add_cdk8s_chart(self, id: str, chart: Construct, options: typing.Optional[KubernetesManifestOptions] = None) -> KubernetesManifestpublic KubernetesManifest addCdk8sChart(String id, Construct chart, KubernetesManifestOptions options)public KubernetesManifest AddCdk8sChart(string id, Construct chart, KubernetesManifestOptions? options = null)func AddCdk8sChart(Id *string, Chart Construct, Options KubernetesManifestOptions) KubernetesManifest#2 parameters · returns
Parameters
ididididId— logical id of this chart.chartchartchartchartChart— the cdk8s chart.
Returns: a KubernetesManifest construct representing the chart.
addHelmChart(id: string, options: HelmChartOptions): HelmChartdef add_helm_chart(self, id: str, options: HelmChartOptions) -> HelmChartpublic HelmChart addHelmChart(String id, HelmChartOptions options)public HelmChart AddHelmChart(string id, HelmChartOptions options)func AddHelmChart(Id *string, Options HelmChartOptions) HelmChart#2 parameters · returns
Parameters
ididididId— logical id of this chart.optionsoptionsoptionsoptionsOptions— options of this chart.
Returns: a HelmChart construct
addManifest(id: string, ...manifest: { [key: string]: any }[]): KubernetesManifestdef add_manifest(self, id: str, manifest: typing.Mapping[str, Any]) -> KubernetesManifestpublic KubernetesManifest addManifest(String id, Map<String, Object> manifest)public KubernetesManifest AddManifest(string id, IDictionary<string, object> manifest)func AddManifest(Id *string, Manifest *map[string]interface{}) KubernetesManifest#The manifest will be applied/deleted using kubectl as needed.
2 parameters · returns
Parameters
ididididId— logical id of this manifest.manifestmanifestmanifestmanifestManifest— a list of Kubernetes resource specifications.
Returns: a KubernetesManifest object.
addServiceAccount(id: string, options?: ServiceAccountOptions): ServiceAccountdef add_service_account(self, id: str, options: typing.Optional[ServiceAccountOptions] = None) -> ServiceAccountpublic ServiceAccount addServiceAccount(String id, ServiceAccountOptions options)public ServiceAccount AddServiceAccount(string id, ServiceAccountOptions? options = null)func AddServiceAccount(Id *string, Options ServiceAccountOptions) ServiceAccount#2 parameters
Parameters
ididididId— logical id of service account.optionsoptionsoptionsoptionsOptions— service account options.
applyRemovalPolicy(policy: RemovalPolicy): voiddef apply_removal_policy(self, policy: RemovalPolicy) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy)public void ApplyRemovalPolicy(RemovalPolicy policy)func ApplyRemovalPolicy(Policy RemovalPolicy)#notes
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).
connectAutoScalingGroupCapacity(autoScalingGroup: AutoScalingGroup, options: AutoScalingGroupOptions): voiddef connect_auto_scaling_group_capacity(self, auto_scaling_group: AutoScalingGroup, options: AutoScalingGroupOptions) -> Nonepublic void connectAutoScalingGroupCapacity(AutoScalingGroup autoScalingGroup, AutoScalingGroupOptions options)public void ConnectAutoScalingGroupCapacity(AutoScalingGroup autoScalingGroup, AutoScalingGroupOptions options)func ConnectAutoScalingGroupCapacity(AutoScalingGroup AutoScalingGroup, Options AutoScalingGroupOptions)#notes · 2 parameters
The AutoScalingGroup must be running an EKS-optimized AMI containing the /etc/eks/bootstrap.sh script. This method will configure Security Groups, add the right policies to the instance role, apply the right tags, and add the required user data to the instance's launch configuration.
Spot instances will be labeled lifecycle=Ec2Spot and tainted with PreferNoSchedule. If kubectl is enabled, the spot interrupt handler daemon will be installed on all spot instances to handle EC2 Spot Instance Termination Notices.
Prefer to use addAutoScalingGroupCapacity if possible.
Parameters
autoScalingGroupauto_scaling_groupautoScalingGroupautoScalingGroupAutoScalingGroup— [disable-awslint:ref-via-interface].optionsoptionsoptionsoptionsOptions— options for adding auto scaling groups, like customizing the bootstrap script.
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.
1 parameter · returns
Parameters
mixinsmixinsmixinsmixinsMixins— The mixins to apply.
Returns: This construct for chaining