使用 fargate 查找 eks 中使用的所有 ip 地址数

Finding all the number of ip addresses used in eks with fargate

我试图了解在 eks with fargate 环境中我的 vpc 的 IP 地址的使用情况。我可以看到每个 pod 都有自己的私有 ip 地址,这似乎与 fargate 节点的 ip 地址相同。似乎 ENI 为 EC2 节点和 many ip address as secondary based on the size 分配了一个主地址,但我在 fargate 上找不到相同的信息。这是否意味着它没有分配任何辅助 IP 地址?

关于这个问题的扩展,似乎 network load balancer 需要至少创建 8 个免费 ip 地址,这是否意味着它会阻止所有 8 个?

...Does that mean it does not have any secondary ip addresses allocated ?

正确,因为您只能在每个 Fargate 实例上 运行 1 个 pod,而在 EC2 节点上您可以 运行 许多 pods.

...Does that mean it blocks all the 8 ?

LB 控制器不会屏蔽子网 IP。当您请求在 IP 不足的子网中创建 NLB 时,您将看到类似以下的错误消息:..."error":"InvalidSubnet: Not enough IP space available in subnet-.... ELB requires at least 8 free IP addresses in each subnet。请注意,这是 ELB 而非 EKS 的要求。