dman
dman

Reputation: 11064

Kubernetes uses dns for nginx proxy_pass but not rewrite

Why does kubernetes (using minikube) use dns for nginx's proxy_pass but not rewrite?

Kubernetes replaces auth-proxy-service.default with ip address

  location /widget-server/ {
    proxy_pass http://auth-proxy-service.default:5902/;
  }

kubernetes does not replace auth-proxy-service.default with ipaddress and the url in browser actually shows http://auth-proxy-service.default:5902/foo

  location /form-builder-auth {
    rewrite ^(.*)$ http://auth-proxy-service.default:5902/foo redirect;
  }

Upvotes: 0

Views: 132

Answers (1)

coderanger
coderanger

Reputation: 54191

Because that's what a redirect means? Reverse proxies are transparent, redirects are user-facing.

Upvotes: 2

Related Questions