@@ -62,6 +62,11 @@ type ClusterParameters struct {
6262 // +optional
6363 EncryptionConfig []EncryptionConfig `json:"encryptionConfig,omitempty"`
6464
65+ // The Kubernetes network configuration for the cluster.
66+ // +immutable
67+ // +optional
68+ KubernetesNetworkConfig * KubernetesNetworkConfigRequest `json:"kubernetesNetworkConfig,omitempty"`
69+
6570 // Enable or disable exporting the Kubernetes control plane logs for your cluster
6671 // to CloudWatch Logs. By default, cluster control plane logs aren't exported
6772 // to CloudWatch Logs. For more information, see Amazon EKS Cluster Control
@@ -151,6 +156,55 @@ type Provider struct {
151156 KeyArn string `json:"keyArn"`
152157}
153158
159+ // IPFamily specifies the ip family
160+ type IPFamily string
161+
162+ const (
163+ // IPFamilyIpv4 means ipv4
164+ IPFamilyIpv4 IPFamily = "ipv4"
165+ // IPFamilyIpv6 means ipv6
166+ IPFamilyIpv6 IPFamily = "ipv6"
167+ )
168+
169+ // KubernetesNetworkConfigRequest specifies the Kubernetes network configuration for the cluster.
170+ type KubernetesNetworkConfigRequest struct {
171+ // Specify which IP family is used to assign Kubernetes pod and service IP
172+ // addresses. If you don't specify a value, ipv4 is used by default. You can only
173+ // specify an IP family when you create a cluster and can't change this value once
174+ // the cluster is created. If you specify ipv6, the VPC and subnets that you
175+ // specify for cluster creation must have both IPv4 and IPv6 CIDR blocks assigned
176+ // to them. You can't specify ipv6 for clusters in China Regions. You can only
177+ // specify ipv6 for 1.21 and later clusters that use version 1.10.1 or later of the
178+ // Amazon VPC CNI add-on. If you specify ipv6, then ensure that your VPC meets the
179+ // requirements listed in the considerations listed in Assigning IPv6 addresses to
180+ // pods and services
181+ // (https://docs.aws.amazon.com/eks/latest/userguide/cni-ipv6.html) in the Amazon
182+ // EKS User Guide. Kubernetes assigns services IPv6 addresses from the unique local
183+ // address range (fc00::/7). You can't specify a custom IPv6 CIDR block. Pod
184+ // addresses are assigned from the subnet's IPv6 CIDR.
185+ IPFamily IPFamily `json:"ipFamily"`
186+
187+ // Don't specify a value if you select ipv6 for ipFamily. The CIDR block to assign
188+ // Kubernetes service IP addresses from. If you don't specify a block, Kubernetes
189+ // assigns addresses from either the 10.100.0.0/16 or 172.20.0.0/16 CIDR blocks. We
190+ // recommend that you specify a block that does not overlap with resources in other
191+ // networks that are peered or connected to your VPC. The block must meet the
192+ // following requirements:
193+ //
194+ // * Within one of the following private IP address
195+ // blocks: 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16.
196+ //
197+ // * Doesn't overlap with
198+ // any CIDR block assigned to the VPC that you selected for VPC.
199+ //
200+ // * Between /24 and
201+ // /12.
202+ //
203+ // You can only specify a custom CIDR block when you create a cluster and
204+ // can't change this value once the cluster is created.
205+ ServiceIpv4Cidr string `json:"serviceIpv4Cidr,omitempty"`
206+ }
207+
154208// Logging in the logging configuration for a cluster.
155209type Logging struct {
156210 // The cluster control plane logging configuration for your cluster.
@@ -277,6 +331,9 @@ type ClusterObservation struct {
277331 // Amazon Web Services cloud.
278332 OutpostConfig OutpostConfigResponse `json:"outpostConfig,omitempty"`
279333
334+ // The Kubernetes network configuration for the cluster.
335+ KubernetesNetworkConfig KubernetesNetworkConfigResponse `json:"kubernetesNetworkConfig,omitempty"`
336+
280337 // The VPC configuration used by the cluster control plane. Amazon EKS VPC resources
281338 // have specific requirements to work properly with Kubernetes. For more information,
282339 // see Cluster VPC Considerations (https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html)
@@ -351,6 +408,32 @@ type OutpostConfigResponse struct {
351408 // contains filtered or unexported fields
352409}
353410
411+ // KubernetesNetworkConfigResponse specifies the Kubernetes network configuration for the cluster.
412+ // The response contains a value for serviceIpv6Cidr or serviceIpv4Cidr, but not both.
413+ type KubernetesNetworkConfigResponse struct {
414+ // The IP family used to assign Kubernetes pod and service IP addresses. The IP
415+ // family is always ipv4, unless you have a 1.21 or later cluster running version
416+ // 1.10.1 or later of the Amazon VPC CNI add-on and specified ipv6 when you created
417+ // the cluster.
418+ IPFamily IPFamily `json:"ipFamily,omitempty"`
419+
420+ // The CIDR block that Kubernetes pod and service IP addresses are assigned from.
421+ // Kubernetes assigns addresses from an IPv4 CIDR block assigned to a subnet that
422+ // the node is in. If you didn't specify a CIDR block when you created the cluster,
423+ // then Kubernetes assigns addresses from either the 10.100.0.0/16 or 172.20.0.0/16
424+ // CIDR blocks. If this was specified, then it was specified when the cluster was
425+ // created and it can't be changed.
426+ ServiceIpv4Cidr string `json:"serviceIpv4Cidr,omitempty"`
427+
428+ // The CIDR block that Kubernetes pod and service IP addresses are assigned from if
429+ // you created a 1.21 or later cluster with version 1.10.1 or later of the Amazon
430+ // VPC CNI add-on and specified ipv6 for ipFamily when you created the cluster.
431+ // Kubernetes assigns service addresses from the unique local address range
432+ // (fc00::/7) because you can't specify a custom IPv6 CIDR block when you create
433+ // the cluster.
434+ ServiceIpv6Cidr string `json:"serviceIpv6Cidr,omitempty"`
435+ }
436+
354437// VpcConfigResponse is the observed VPC configuration for a cluster.
355438type VpcConfigResponse struct {
356439 // The cluster security group that was created by Amazon EKS for the cluster.
0 commit comments