Class: AWSCDK::EKSv2::ClusterProps

Inherits:
ClusterCommonOptions
  • Object
show all
Defined in:
ek_sv2/cluster_props.rb

Overview

Properties for configuring a standard EKS cluster (non-Fargate).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(version:, alb_controller: nil, cluster_logging: nil, cluster_name: nil, core_dns_compute_type: nil, endpoint_access: nil, ip_family: nil, kubectl_provider_options: nil, masters_role: nil, prune: nil, remote_node_networks: nil, remote_pod_networks: nil, removal_policy: nil, role: nil, secrets_encryption_key: nil, security_group: nil, service_ipv4_cidr: nil, tags: nil, vpc: nil, vpc_subnets: nil, bootstrap_cluster_creator_admin_permissions: nil, bootstrap_self_managed_addons: nil, compute: nil, default_capacity: nil, default_capacity_instance: nil, default_capacity_type: nil, output_config_command: nil) ⇒ ClusterProps

Returns a new instance of ClusterProps.

Parameters:

  • version (AWSCDK::EKSv2::KubernetesVersion)

    The Kubernetes version to run in the cluster.

  • alb_controller (AWSCDK::EKSv2::ALBControllerOptions, nil) (defaults to: nil)

    Install the AWS Load Balancer Controller onto the cluster.

  • cluster_logging (Array<AWSCDK::EKSv2::ClusterLoggingTypes>, nil) (defaults to: nil)

    The cluster log types which you want to enable.

  • cluster_name (String, nil) (defaults to: nil)

    Name for the cluster.

  • core_dns_compute_type (AWSCDK::EKSv2::CoreDNSComputeType, nil) (defaults to: nil)

    Controls the "eks.amazonaws.com/compute-type" annotation in the CoreDNS configuration on your cluster to determine which compute type to use for CoreDNS.

  • endpoint_access (AWSCDK::EKSv2::EndpointAccess, nil) (defaults to: nil)

    Configure access to the Kubernetes API server endpoint..

  • ip_family (AWSCDK::EKSv2::IPFamily, nil) (defaults to: nil)

    Specify which IP family is used to assign Kubernetes pod and service IP addresses.

  • kubectl_provider_options (AWSCDK::EKSv2::KubectlProviderOptions, nil) (defaults to: nil)

    Options for creating the kubectl provider - a lambda function that executes kubectl and helm against the cluster.

  • masters_role (AWSCDK::IAM::IRole, nil) (defaults to: nil)

    An IAM role that will be added to the system:masters Kubernetes RBAC group.

  • prune (Boolean, nil) (defaults to: nil)

    Indicates whether Kubernetes resources added through addManifest() can be automatically pruned.

  • remote_node_networks (Array<AWSCDK::EKSv2::RemoteNodeNetwork>, nil) (defaults to: nil)

    IPv4 CIDR blocks defining the expected address range of hybrid nodes that will join the cluster.

  • remote_pod_networks (Array<AWSCDK::EKSv2::RemotePodNetwork>, nil) (defaults to: nil)

    IPv4 CIDR blocks for Pods running Kubernetes webhooks on hybrid nodes.

  • removal_policy (AWSCDK::RemovalPolicy, nil) (defaults to: nil)

    The removal policy applied to all CloudFormation resources created by this construct when they are no longer managed by CloudFormation.

  • role (AWSCDK::IAM::IRole, nil) (defaults to: nil)

    Role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.

  • secrets_encryption_key (AWSCDK::Interfaces::AWSKMS::IKeyRef, nil) (defaults to: nil)

    KMS secret for envelope encryption for Kubernetes secrets.

  • security_group (AWSCDK::EC2::ISecurityGroup, nil) (defaults to: nil)

    Security Group to use for Control Plane ENIs.

  • service_ipv4_cidr (String, nil) (defaults to: nil)

    The CIDR block to assign Kubernetes service IP addresses from.

  • tags (Hash{String => String}, nil) (defaults to: nil)

    The tags assigned to the EKS cluster.

  • vpc (AWSCDK::EC2::IVPC, nil) (defaults to: nil)

    The VPC in which to create the Cluster.

  • vpc_subnets (Array<AWSCDK::EC2::SubnetSelection>, nil) (defaults to: nil)

    Where to place EKS Control Plane ENIs.

  • bootstrap_cluster_creator_admin_permissions (Boolean, nil) (defaults to: nil)

    Whether or not IAM principal of the cluster creator was set as a cluster admin access entry during cluster creation time.

  • bootstrap_self_managed_addons (Boolean, nil) (defaults to: nil)

    If you set this value to False when creating a cluster, the default networking add-ons will not be installed.

  • compute (AWSCDK::EKSv2::ComputeConfig, nil) (defaults to: nil)

    Configuration for compute settings in Auto Mode.

  • default_capacity (Numeric, nil) (defaults to: nil)

    Number of instances to allocate as an initial capacity for this cluster.

  • default_capacity_instance (AWSCDK::EC2::InstanceType, nil) (defaults to: nil)

    The instance type to use for the default capacity.

  • default_capacity_type (AWSCDK::EKSv2::DefaultCapacityType, nil) (defaults to: nil)

    The default capacity type for the cluster.

  • output_config_command (Boolean, nil) (defaults to: nil)

    Determines whether a CloudFormation output with the aws eks update-kubeconfig command will be synthesized.



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'ek_sv2/cluster_props.rb', line 34

def initialize(version:, alb_controller: nil, cluster_logging: nil, cluster_name: nil, core_dns_compute_type: nil, endpoint_access: nil, ip_family: nil, kubectl_provider_options: nil, masters_role: nil, prune: nil, remote_node_networks: nil, remote_pod_networks: nil, removal_policy: nil, role: nil, secrets_encryption_key: nil, security_group: nil, service_ipv4_cidr: nil, tags: nil, vpc: nil, vpc_subnets: nil, bootstrap_cluster_creator_admin_permissions: nil, bootstrap_self_managed_addons: nil, compute: nil, default_capacity: nil, default_capacity_instance: nil, default_capacity_type: nil, output_config_command: nil)
  @version = version
  Jsii::Type.check_type(@version, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkt1YmVybmV0ZXNWZXJzaW9uIn0=")), "version")
  @alb_controller = alb_controller.is_a?(Hash) ? ::AWSCDK::EKSv2::ALBControllerOptions.new(**alb_controller.transform_keys(&:to_sym)) : alb_controller
  Jsii::Type.check_type(@alb_controller, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkFsYkNvbnRyb2xsZXJPcHRpb25zIn0=")), "albController") unless @alb_controller.nil?
  @cluster_logging = cluster_logging
  Jsii::Type.check_type(@cluster_logging, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3NfdjIuQ2x1c3RlckxvZ2dpbmdUeXBlcyJ9LCJraW5kIjoiYXJyYXkifX0=")), "clusterLogging") unless @cluster_logging.nil?
  @cluster_name = cluster_name
  Jsii::Type.check_type(@cluster_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clusterName") unless @cluster_name.nil?
  @core_dns_compute_type = core_dns_compute_type
  Jsii::Type.check_type(@core_dns_compute_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkNvcmVEbnNDb21wdXRlVHlwZSJ9")), "coreDnsComputeType") unless @core_dns_compute_type.nil?
  @endpoint_access = endpoint_access
  Jsii::Type.check_type(@endpoint_access, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkVuZHBvaW50QWNjZXNzIn0=")), "endpointAccess") unless @endpoint_access.nil?
  @ip_family = ip_family
  Jsii::Type.check_type(@ip_family, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLklwRmFtaWx5In0=")), "ipFamily") unless @ip_family.nil?
  @kubectl_provider_options = kubectl_provider_options.is_a?(Hash) ? ::AWSCDK::EKSv2::KubectlProviderOptions.new(**kubectl_provider_options.transform_keys(&:to_sym)) : kubectl_provider_options
  Jsii::Type.check_type(@kubectl_provider_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkt1YmVjdGxQcm92aWRlck9wdGlvbnMifQ==")), "kubectlProviderOptions") unless @kubectl_provider_options.nil?
  @masters_role = masters_role
  Jsii::Type.check_type(@masters_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "mastersRole") unless @masters_role.nil?
  @prune = prune
  Jsii::Type.check_type(@prune, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "prune") unless @prune.nil?
  @remote_node_networks = remote_node_networks.is_a?(Array) ? remote_node_networks.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::EKSv2::RemoteNodeNetwork.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : remote_node_networks
  Jsii::Type.check_type(@remote_node_networks, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3NfdjIuUmVtb3RlTm9kZU5ldHdvcmsifSwia2luZCI6ImFycmF5In19")), "remoteNodeNetworks") unless @remote_node_networks.nil?
  @remote_pod_networks = remote_pod_networks.is_a?(Array) ? remote_pod_networks.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::EKSv2::RemotePodNetwork.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : remote_pod_networks
  Jsii::Type.check_type(@remote_pod_networks, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3NfdjIuUmVtb3RlUG9kTmV0d29yayJ9LCJraW5kIjoiYXJyYXkifX0=")), "remotePodNetworks") unless @remote_pod_networks.nil?
  @removal_policy = removal_policy
  Jsii::Type.check_type(@removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "removalPolicy") unless @removal_policy.nil?
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil?
  @secrets_encryption_key = secrets_encryption_key
  Jsii::Type.check_type(@secrets_encryption_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19rbXMuSUtleVJlZiJ9")), "secretsEncryptionKey") unless @secrets_encryption_key.nil?
  @security_group = security_group
  Jsii::Type.check_type(@security_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklTZWN1cml0eUdyb3VwIn0=")), "securityGroup") unless @security_group.nil?
  @service_ipv4_cidr = service_ipv4_cidr
  Jsii::Type.check_type(@service_ipv4_cidr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceIpv4Cidr") unless @service_ipv4_cidr.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil?
  @vpc = vpc
  Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc") unless @vpc.nil?
  @vpc_subnets = vpc_subnets.is_a?(Array) ? vpc_subnets.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::EC2::SubnetSelection.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : vpc_subnets
  Jsii::Type.check_type(@vpc_subnets, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuU3VibmV0U2VsZWN0aW9uIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "vpcSubnets") unless @vpc_subnets.nil?
  @bootstrap_cluster_creator_admin_permissions = bootstrap_cluster_creator_admin_permissions
  Jsii::Type.check_type(@bootstrap_cluster_creator_admin_permissions, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "bootstrapClusterCreatorAdminPermissions") unless @bootstrap_cluster_creator_admin_permissions.nil?
  @bootstrap_self_managed_addons = bootstrap_self_managed_addons
  Jsii::Type.check_type(@bootstrap_self_managed_addons, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "bootstrapSelfManagedAddons") unless @bootstrap_self_managed_addons.nil?
  @compute = compute.is_a?(Hash) ? ::AWSCDK::EKSv2::ComputeConfig.new(**compute.transform_keys(&:to_sym)) : compute
  Jsii::Type.check_type(@compute, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkNvbXB1dGVDb25maWcifQ==")), "compute") unless @compute.nil?
  @default_capacity = default_capacity
  Jsii::Type.check_type(@default_capacity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "defaultCapacity") unless @default_capacity.nil?
  @default_capacity_instance = default_capacity_instance
  Jsii::Type.check_type(@default_capacity_instance, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkluc3RhbmNlVHlwZSJ9")), "defaultCapacityInstance") unless @default_capacity_instance.nil?
  @default_capacity_type = default_capacity_type
  Jsii::Type.check_type(@default_capacity_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkRlZmF1bHRDYXBhY2l0eVR5cGUifQ==")), "defaultCapacityType") unless @default_capacity_type.nil?
  @output_config_command = output_config_command
  Jsii::Type.check_type(@output_config_command, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "outputConfigCommand") unless @output_config_command.nil?
end

Instance Attribute Details

#alb_controllerAWSCDK::EKSv2::ALBControllerOptions? (readonly)

Note:

Default: - The controller is not installed.

Install the AWS Load Balancer Controller onto the cluster.



100
101
102
# File 'ek_sv2/cluster_props.rb', line 100

def alb_controller
  @alb_controller
end

#bootstrap_cluster_creator_admin_permissionsBoolean? (readonly)

Note:

Default: true

Whether or not IAM principal of the cluster creator was set as a cluster admin access entry during cluster creation time.

Changing this value after the cluster has been created will result in the cluster being replaced.

Returns:

  • (Boolean, nil)


220
221
222
# File 'ek_sv2/cluster_props.rb', line 220

def bootstrap_cluster_creator_admin_permissions
  @bootstrap_cluster_creator_admin_permissions
end

#bootstrap_self_managed_addonsBoolean? (readonly)

Note:

Default: true if the mode is not EKS Auto Mode

If you set this value to False when creating a cluster, the default networking add-ons will not be installed.

The default networking addons include vpc-cni, coredns, and kube-proxy. Use this option when you plan to install third-party alternative add-ons or self-manage the default networking add-ons.

Changing this value after the cluster has been created will result in the cluster being replaced.

Returns:

  • (Boolean, nil)


230
231
232
# File 'ek_sv2/cluster_props.rb', line 230

def bootstrap_self_managed_addons
  @bootstrap_self_managed_addons
end

#cluster_loggingArray<AWSCDK::EKSv2::ClusterLoggingTypes>? (readonly)

Note:

Default: - none

The cluster log types which you want to enable.

Returns:



105
106
107
# File 'ek_sv2/cluster_props.rb', line 105

def cluster_logging
  @cluster_logging
end

#cluster_nameString? (readonly)

Note:

Default: - Automatically generated name

Name for the cluster.

Returns:

  • (String, nil)


110
111
112
# File 'ek_sv2/cluster_props.rb', line 110

def cluster_name
  @cluster_name
end

#computeAWSCDK::EKSv2::ComputeConfig? (readonly)

Note:

Default: - Auto Mode compute disabled

Configuration for compute settings in Auto Mode.

When enabled, EKS will automatically manage compute resources.



237
238
239
# File 'ek_sv2/cluster_props.rb', line 237

def compute
  @compute
end

#core_dns_compute_typeAWSCDK::EKSv2::CoreDNSComputeType? (readonly)

Note:

Default: CoreDnsComputeType.EC2 (for FargateCluster the default is FARGATE)

Controls the "eks.amazonaws.com/compute-type" annotation in the CoreDNS configuration on your cluster to determine which compute type to use for CoreDNS.



115
116
117
# File 'ek_sv2/cluster_props.rb', line 115

def core_dns_compute_type
  @core_dns_compute_type
end

#default_capacityNumeric? (readonly)

Note:

Default: 2

Number of instances to allocate as an initial capacity for this cluster.

Instance type can be configured through default_capacity_instance_type, which defaults to m5.large.

Use cluster.addAutoScalingGroupCapacity to add additional customized capacity. Set this to 0 is you wish to avoid the initial capacity allocation.

Returns:

  • (Numeric, nil)


248
249
250
# File 'ek_sv2/cluster_props.rb', line 248

def default_capacity
  @default_capacity
end

#default_capacity_instanceAWSCDK::EC2::InstanceType? (readonly)

Note:

Default: m5.large

The instance type to use for the default capacity.

This will only be taken into account if default_capacity is > 0.

Returns:



256
257
258
# File 'ek_sv2/cluster_props.rb', line 256

def default_capacity_instance
  @default_capacity_instance
end

#default_capacity_typeAWSCDK::EKSv2::DefaultCapacityType? (readonly)

Note:

Default: AUTOMODE

The default capacity type for the cluster.



261
262
263
# File 'ek_sv2/cluster_props.rb', line 261

def default_capacity_type
  @default_capacity_type
end

#endpoint_accessAWSCDK::EKSv2::EndpointAccess? (readonly)

Note:

Default: EndpointAccess.PUBLIC_AND_PRIVATE

Configure access to the Kubernetes API server endpoint..



121
122
123
# File 'ek_sv2/cluster_props.rb', line 121

def endpoint_access
  @endpoint_access
end

#ip_familyAWSCDK::EKSv2::IPFamily? (readonly)

Note:

Default: IpFamily.IP_V4

Specify which IP family is used to assign Kubernetes pod and service IP addresses.



127
128
129
# File 'ek_sv2/cluster_props.rb', line 127

def ip_family
  @ip_family
end

#kubectl_provider_optionsAWSCDK::EKSv2::KubectlProviderOptions? (readonly)

Note:

Default: - kubectl provider will not be created

Options for creating the kubectl provider - a lambda function that executes kubectl and helm against the cluster.

If defined, kubectl_layer is a required property.



134
135
136
# File 'ek_sv2/cluster_props.rb', line 134

def kubectl_provider_options
  @kubectl_provider_options
end

#masters_roleAWSCDK::IAM::IRole? (readonly)

Note:

Default: - no masters role.

An IAM role that will be added to the system:masters Kubernetes RBAC group.



140
141
142
# File 'ek_sv2/cluster_props.rb', line 140

def masters_role
  @masters_role
end

#output_config_commandBoolean? (readonly)

Note:

Default: true

Determines whether a CloudFormation output with the aws eks update-kubeconfig command will be synthesized.

This command will include the cluster name and, if applicable, the ARN of the masters IAM role.

Returns:

  • (Boolean, nil)


269
270
271
# File 'ek_sv2/cluster_props.rb', line 269

def output_config_command
  @output_config_command
end

#pruneBoolean? (readonly)

Note:

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.

Returns:

  • (Boolean, nil)


149
150
151
# File 'ek_sv2/cluster_props.rb', line 149

def prune
  @prune
end

#remote_node_networksArray<AWSCDK::EKSv2::RemoteNodeNetwork>? (readonly)

Note:

Default: - none

IPv4 CIDR blocks defining the expected address range of hybrid nodes that will join the cluster.

Returns:



154
155
156
# File 'ek_sv2/cluster_props.rb', line 154

def remote_node_networks
  @remote_node_networks
end

#remote_pod_networksArray<AWSCDK::EKSv2::RemotePodNetwork>? (readonly)

Note:

Default: - none

IPv4 CIDR blocks for Pods running Kubernetes webhooks on hybrid nodes.

Returns:



159
160
161
# File 'ek_sv2/cluster_props.rb', line 159

def remote_pod_networks
  @remote_pod_networks
end

#removal_policyAWSCDK::RemovalPolicy? (readonly)

Note:

Default: - Resources will be deleted.

The removal policy applied to all CloudFormation resources created by this construct when they are no longer managed by CloudFormation.

This can happen in one of three situations:

  • The resource is removed from the template, so CloudFormation stops managing it;
  • A change to the resource is made that requires it to be replaced, so CloudFormation stops managing it;
  • The stack is deleted, so CloudFormation stops managing all resources in it.

This affects the EKS cluster itself, associated IAM roles, node groups, security groups, VPC and any other CloudFormation resources managed by this construct.

Returns:



173
174
175
# File 'ek_sv2/cluster_props.rb', line 173

def removal_policy
  @removal_policy
end

#roleAWSCDK::IAM::IRole? (readonly)

Note:

Default: - A role is automatically created for you

Role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.

Returns:



178
179
180
# File 'ek_sv2/cluster_props.rb', line 178

def role
  @role
end

#secrets_encryption_keyAWSCDK::Interfaces::AWSKMS::IKeyRef? (readonly)

Note:

Default: - By default, Kubernetes stores all secret object data within etcd and all etcd volumes used by Amazon EKS are encrypted at the disk-level using AWS-Managed encryption keys.

KMS secret for envelope encryption for Kubernetes secrets.



183
184
185
# File 'ek_sv2/cluster_props.rb', line 183

def secrets_encryption_key
  @secrets_encryption_key
end

#security_groupAWSCDK::EC2::ISecurityGroup? (readonly)

Note:

Default: - A security group is automatically created

Security Group to use for Control Plane ENIs.

Returns:



188
189
190
# File 'ek_sv2/cluster_props.rb', line 188

def security_group
  @security_group
end

#service_ipv4_cidrString? (readonly)

Note:

Default: - Kubernetes assigns addresses from either the 10.100.0.0/16 or 172.20.0.0/16 CIDR blocks

The CIDR block to assign Kubernetes service IP addresses from.



194
195
196
# File 'ek_sv2/cluster_props.rb', line 194

def service_ipv4_cidr
  @service_ipv4_cidr
end

#tagsHash{String => String}? (readonly)

Note:

Default: - none

The tags assigned to the EKS cluster.

Returns:

  • (Hash{String => String}, nil)


199
200
201
# File 'ek_sv2/cluster_props.rb', line 199

def tags
  @tags
end

#versionAWSCDK::EKSv2::KubernetesVersion (readonly)

The Kubernetes version to run in the cluster.



94
95
96
# File 'ek_sv2/cluster_props.rb', line 94

def version
  @version
end

#vpcAWSCDK::EC2::IVPC? (readonly)

Note:

Default: - a VPC with default configuration will be created and can be accessed through cluster.vpc.

The VPC in which to create the Cluster.

Returns:



204
205
206
# File 'ek_sv2/cluster_props.rb', line 204

def vpc
  @vpc
end

#vpc_subnetsArray<AWSCDK::EC2::SubnetSelection>? (readonly)

Note:

Default: - All public and private subnets

Where to place EKS Control Plane ENIs.

For example, to only select private subnets, supply the following:

vpcSubnets: [{ subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS }]

Returns:



213
214
215
# File 'ek_sv2/cluster_props.rb', line 213

def vpc_subnets
  @vpc_subnets
end

Class Method Details

.jsii_propertiesObject



271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
# File 'ek_sv2/cluster_props.rb', line 271

def self.jsii_properties
  {
    :version => "version",
    :alb_controller => "albController",
    :cluster_logging => "clusterLogging",
    :cluster_name => "clusterName",
    :core_dns_compute_type => "coreDnsComputeType",
    :endpoint_access => "endpointAccess",
    :ip_family => "ipFamily",
    :kubectl_provider_options => "kubectlProviderOptions",
    :masters_role => "mastersRole",
    :prune => "prune",
    :remote_node_networks => "remoteNodeNetworks",
    :remote_pod_networks => "remotePodNetworks",
    :removal_policy => "removalPolicy",
    :role => "role",
    :secrets_encryption_key => "secretsEncryptionKey",
    :security_group => "securityGroup",
    :service_ipv4_cidr => "serviceIpv4Cidr",
    :tags => "tags",
    :vpc => "vpc",
    :vpc_subnets => "vpcSubnets",
    :bootstrap_cluster_creator_admin_permissions => "bootstrapClusterCreatorAdminPermissions",
    :bootstrap_self_managed_addons => "bootstrapSelfManagedAddons",
    :compute => "compute",
    :default_capacity => "defaultCapacity",
    :default_capacity_instance => "defaultCapacityInstance",
    :default_capacity_type => "defaultCapacityType",
    :output_config_command => "outputConfigCommand",
  }
end

Instance Method Details

#to_jsiiObject



303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
# File 'ek_sv2/cluster_props.rb', line 303

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "version" => @version,
    "albController" => @alb_controller,
    "clusterLogging" => @cluster_logging,
    "clusterName" => @cluster_name,
    "coreDnsComputeType" => @core_dns_compute_type,
    "endpointAccess" => @endpoint_access,
    "ipFamily" => @ip_family,
    "kubectlProviderOptions" => @kubectl_provider_options,
    "mastersRole" => @masters_role,
    "prune" => @prune,
    "remoteNodeNetworks" => @remote_node_networks,
    "remotePodNetworks" => @remote_pod_networks,
    "removalPolicy" => @removal_policy,
    "role" => @role,
    "secretsEncryptionKey" => @secrets_encryption_key,
    "securityGroup" => @security_group,
    "serviceIpv4Cidr" => @service_ipv4_cidr,
    "tags" => @tags,
    "vpc" => @vpc,
    "vpcSubnets" => @vpc_subnets,
    "bootstrapClusterCreatorAdminPermissions" => @bootstrap_cluster_creator_admin_permissions,
    "bootstrapSelfManagedAddons" => @bootstrap_self_managed_addons,
    "compute" => @compute,
    "defaultCapacity" => @default_capacity,
    "defaultCapacityInstance" => @default_capacity_instance,
    "defaultCapacityType" => @default_capacity_type,
    "outputConfigCommand" => @output_config_command,
  })
  result.compact
end