默认Amazon VPC CNI
By default, when the Amazon VPC CNI plugin for Kubernetes creates secondary elastic network interfaces (network interfaces) for your Amazon EC2 node, it creates them in the same subnet as the node’s primary network interface. It also associates the same security groups to the secondary network interface that are associated to the primary network interface. For one or more of the following reasons, you might want the plugin to create secondary network interfaces in a different subnet or want to associate different security groups to the secondary network interfaces, or both:
IPv4
addresses that are available in the subnet that the primary network interface is in. This might limit the number of pods that you can create in the subnet. By using a different subnet for secondary network interfaces, you can increase the number of available IPv4
addresses available for pods.Considerations
pods
.IPv6
family, you can’t use custom networking.IPv4
address exhaustion, you can create a cluster using the IPv6
family instead. For more information, see Tutorial: Assigning IPv6 addresses to pods and services
.实验: https://www.eksworkshop.com/beginner/160_advanced-networking/secondary_cidr/
https://aws.github.io/aws-eks-best-practices/networking/custom-networking/