I have an in-cluster Kubernetes pod/application that works fine when accessing it via an nginx-ingress
ingress controller (requires specific Host
HTTP header), but it cannot be accessed by other in-cluster pods/applications (i.e. for testing) due to the pods using different host names (e.g. service-name.namespace.svc.cluster.local
) rather than the FQDN of the K8S master (in the LAN).
I think the only way to (easily) resolve this is to setup an in-cluster forward-proxy nginx
instance. Ideally, the service is either a side-car for the pod that needs to have headers re-written, or it needs to be a general in-cluster proxy that multiple services can access.
Question
nginx
forward proxy service?The linked "similar" questions don't appear to be helpful for my use case (i.e. don't show how to configure an in-cluster proxy), or are focused on proxying to IPs external to the cluster (i.e. I need to proxy HTTP requests, and re-write their headers, to in-cluster resources).