Is that possible to define an ingress (ingresses.networking.k8s.io
) forwarding requests to a concrete static IP-address in a private network?
I have a service that isn't running on a K8S cluster, but it resides in a private network, and all K8S pods have access to this network. There are many auxiliary services in this network, I don't want to deploy these services in a K8S cluster due to certain reasons. And I'd like to have some of these services exposed via ingress-nginx, but at this time I don't see a way to define the backend as a static IP-address.
Is that possible?
Thanks!
You can use external service as Ingress backend.
You can introduce any external IP address as a Kubernetes service by creating a matching Service and Endpoint object. Then you can use this service as a backend for your Ingress rules.
More details can be found here.
Note: You cannot edit an existing
ingress-nginx
load balancer service, but you can pass the external IP you want it to use when installing it. Keep in mind, you need to have that external IP set up ahead of time in your cloud environment.Here is the command that worked for me when performing a helm installation:
More info:
--set