I currently have a Kubernetes cluster, and we have a service that needs to be accessible from a virtual ip.
This in itself is not a difficult process - can use keepalived and nodeports. However, I need that service when its making outbound connections to be bound to that virtual ip (this is due to a legacy system we interact with).
Is there anything in place or that I can use that will help me with this in a generic way.
I essentially want traffic from a specific service to come out of the virtual ip and not the kubernetes host's ip.
You can use hostNetwork: true
for your deployment, this will start your pods outside of NAT, and you will be able to see all the system interfaces.
Keep in mind that nodePort won’t be available when hostNetwork is enabled.