问题描述
一家公司想要使用命名空间扩展他们的微服务应用程序,命名空间代表每个客户端一个单独的应用程序.该应用程序由 22 个微服务组成,公司有 80 个客户端,因此集群中将有 22 * 80 = 1760 个 pod.示意图如下.
最初的计算是,拥有 4 个 r4.xlarge 节点就足以保持适当的性能.但该公司遇到了另一种问题:
限制是因为您使用的是 AWS VPC CN 插件 docs.aws.amazon.com/eks/latest/userguide/pod-networking.html.使用此插件可以让 Kubernetes pod 在 pod 内拥有与它们在 VPC 网络上相同的 IP 地址.
根据文档,Amazon VPC CNI 插件可能无法满足所有用例的要求.Amazon EKS 维护着一个合作伙伴网络,这些合作伙伴提供具有商业支持选项的替代 CNI 解决方案.有关更多信息,请参阅替代兼容的 CNI 插件.https://docs.aws.amazon.com/eks/latest/userguide/alternate-cni-plugins.html
请注意,您不能使用 AWS Load Balancer Controller 的 IP 地址定位模式.它必须是实例定位模式.
A company would like to scale their microservice application using namespaces, namespace represents a separate application per each client. The application consists of 22 microservices, the company has 80 clients, hence there will be 22 * 80 = 1760 pods in the cluster. The diagram is given below.
It was initially calculated that it would be enough to have 4 r4.xlarge nodes to keep proper performance. But the company has encountered a different kind of problem: the number of IP addresses per instance. For example, for 4 nodes of r4.xlarge type only: 4(nodes) * 4(network interfaces) * 15(Private IPv4 addresses) = 240 addresses available, but 1760 needed!
Increasing the number of nodes several times over budget.Are there any ways to avoid that IPs amount limitation? Or maybe you can propose another solution
Limitation is because you are using AWS VPC CN Plugin docs.aws.amazon.com/eks/latest/userguide/pod-networking.html.Using this plugin allows Kubernetes pods to have the same IP address inside the pod as they do on the VPC network.
As per Documentation, The Amazon VPC CNI plugin might not meet requirements for all use cases. Amazon EKS maintains a network of partners that offer alternative CNI solutions with commercial support options. For more information, see Alternate compatible CNI plugins. https://docs.aws.amazon.com/eks/latest/userguide/alternate-cni-plugins.html
Please note that you cannot use IP address targeting mode of AWS Load Balancer Controller. It will have to be Instance Targeting Mode.
这篇关于避免每个节点的 AWS EKS IP 限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!