0

I have applications needs to give each pod a public ip and expose ports on this public ip.

I am trying not to use virtual machines.

matellb has similar feature. But, it binds a address to a service not pod. And, it wastes a lot of bandwidth.

Lod
  • 1
  • 2

1 Answers1

1

Technically this is up to your CNI plugin, however very few support this. Pods generally live in the internal cluster network and are exposed externally through either NodePort or LoadBalancer services, for example using MetalLB. Why do you think this "wastes bandwidth"? If you're concerned about internal rerouting, you may want to enable externalTrafficPolicy: Local to reduce internal bounces but your internal network probably has a lot more bandwidth available than your internet connection so it that's not usually a reason to worry.

coderanger
  • 52,400
  • 4
  • 52
  • 75
  • MetalLB uses one server to route all traffics to other nodes. The bandwidth is limited by that one machine which is not what I wanted. – Lod Jun 13 '21 at 05:20
  • Only in L2 (aka ARP steering) mode. In BGP mode it can fully balance across multiple. Also there are other options beyond just MetalLB. – coderanger Jun 13 '21 at 19:00
  • We cannot use BGP mode. name a few other options please – Lod Jun 14 '21 at 05:11
  • Depending on your switching hardware, CARP supports multi-host balancing using multicast MACs. I think VRRP does as well but I've never used it. – coderanger Jun 14 '21 at 05:16