How to assign a public ip to a pod on dedicated servers

199 Views Asked by At

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.

1

There are 1 best solutions below

4
On

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.