Reputation: 11064
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
Reputation: 54191
Because that's what a redirect means? Reverse proxies are transparent, redirects are user-facing.
Upvotes: 2