Class: AWSCDK::EKS::CfnCluster::KubernetesNetworkConfigProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EKS::CfnCluster::KubernetesNetworkConfigProperty
- Defined in:
- eks/cfn_cluster.rb
Overview
The Kubernetes network configuration for the cluster.
Instance Attribute Summary collapse
-
#elastic_load_balancing ⇒ AWSCDK::IResolvable, ...
readonly
Request to enable or disable the load balancing capability on your EKS Auto Mode cluster.
-
#ip_family ⇒ String?
readonly
Specify which IP family is used to assign Kubernetes pod and service IP addresses.
-
#service_ipv4_cidr ⇒ String?
readonly
Don't specify a value if you select
ipv6for ipFamily . -
#service_ipv6_cidr ⇒ String?
readonly
The CIDR block that Kubernetes pod and service IP addresses are assigned from if you created a 1.21 or later cluster with version 1.10.1 or later of the Amazon VPC CNI add-on and specified
ipv6for ipFamily when you created the cluster.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(elastic_load_balancing: nil, ip_family: nil, service_ipv4_cidr: nil, service_ipv6_cidr: nil) ⇒ KubernetesNetworkConfigProperty
constructor
A new instance of KubernetesNetworkConfigProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(elastic_load_balancing: nil, ip_family: nil, service_ipv4_cidr: nil, service_ipv6_cidr: nil) ⇒ KubernetesNetworkConfigProperty
Returns a new instance of KubernetesNetworkConfigProperty.
1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 |
# File 'eks/cfn_cluster.rb', line 1254 def initialize(elastic_load_balancing: nil, ip_family: nil, service_ipv4_cidr: nil, service_ipv6_cidr: nil) @elastic_load_balancing = elastic_load_balancing.is_a?(Hash) ? ::AWSCDK::EKS::CfnCluster::ElasticLoadBalancingProperty.new(**elastic_load_balancing.transform_keys(&:to_sym)) : elastic_load_balancing Jsii::Type.check_type(@elastic_load_balancing, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3MuQ2ZuQ2x1c3Rlci5FbGFzdGljTG9hZEJhbGFuY2luZ1Byb3BlcnR5In1dfX0=")), "elasticLoadBalancing") unless @elastic_load_balancing.nil? @ip_family = ip_family Jsii::Type.check_type(@ip_family, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ipFamily") unless @ip_family.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? @service_ipv6_cidr = service_ipv6_cidr Jsii::Type.check_type(@service_ipv6_cidr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceIpv6Cidr") unless @service_ipv6_cidr.nil? end |
Instance Attribute Details
#elastic_load_balancing ⇒ AWSCDK::IResolvable, ... (readonly)
Request to enable or disable the load balancing capability on your EKS Auto Mode cluster.
For more information, see EKS Auto Mode load balancing capability in the Amazon EKS User Guide .
1271 1272 1273 |
# File 'eks/cfn_cluster.rb', line 1271 def elastic_load_balancing @elastic_load_balancing end |
#ip_family ⇒ String? (readonly)
Specify which IP family is used to assign Kubernetes pod and service IP addresses.
If you don't specify a value, ipv4 is used by default. You can only specify an IP family when you create a cluster and can't change this value once the cluster is created. If you specify ipv6 , the VPC and subnets that you specify for cluster creation must have both IPv4 and IPv6 CIDR blocks assigned to them. You can't specify ipv6 for clusters in China Regions.
You can only specify ipv6 for 1.21 and later clusters that use version 1.10.1 or later of the Amazon VPC CNI add-on. If you specify ipv6 , then ensure that your VPC meets the requirements listed in the considerations listed in Assigning IPv6 addresses to pods and services in the Amazon EKS User Guide . Kubernetes assigns services IPv6 addresses from the unique local address range (fc00::/7) . You can't specify a custom IPv6 CIDR block. Pod addresses are assigned from the subnet's IPv6 CIDR.
1280 1281 1282 |
# File 'eks/cfn_cluster.rb', line 1280 def ip_family @ip_family end |
#service_ipv4_cidr ⇒ String? (readonly)
Don't specify a value if you select ipv6 for ipFamily .
The CIDR block to assign Kubernetes service IP addresses from. If you don't specify a block, Kubernetes assigns addresses from either the 10.100.0.0/16 or 172.20.0.0/16 CIDR blocks. We recommend that you specify a block that does not overlap with resources in other networks that are peered or connected to your VPC. The block must meet the following requirements:
- Within one of the following private IP address blocks:
10.0.0.0/8,172.16.0.0/12, or192.168.0.0/16. - Doesn't overlap with any CIDR block assigned to the VPC that you selected for VPC.
- Between
/24and/12.
You can only specify a custom CIDR block when you create a cluster. You can't change this value after the cluster is created.
1293 1294 1295 |
# File 'eks/cfn_cluster.rb', line 1293 def service_ipv4_cidr @service_ipv4_cidr end |
#service_ipv6_cidr ⇒ String? (readonly)
The CIDR block that Kubernetes pod and service IP addresses are assigned from if you created a 1.21 or later cluster with version 1.10.1 or later of the Amazon VPC CNI add-on and specified ipv6 for ipFamily when you created the cluster. Kubernetes assigns service addresses from the unique local address range ( fc00::/7 ) because you can't specify a custom IPv6 CIDR block when you create the cluster.
1298 1299 1300 |
# File 'eks/cfn_cluster.rb', line 1298 def service_ipv6_cidr @service_ipv6_cidr end |
Class Method Details
.jsii_properties ⇒ Object
1300 1301 1302 1303 1304 1305 1306 1307 |
# File 'eks/cfn_cluster.rb', line 1300 def self.jsii_properties { :elastic_load_balancing => "elasticLoadBalancing", :ip_family => "ipFamily", :service_ipv4_cidr => "serviceIpv4Cidr", :service_ipv6_cidr => "serviceIpv6Cidr", } end |
Instance Method Details
#to_jsii ⇒ Object
1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 |
# File 'eks/cfn_cluster.rb', line 1309 def to_jsii result = {} result.merge!({ "elasticLoadBalancing" => @elastic_load_balancing, "ipFamily" => @ip_family, "serviceIpv4Cidr" => @service_ipv4_cidr, "serviceIpv6Cidr" => @service_ipv6_cidr, }) result.compact end |