By default, flask turns redirects into absolute URLs. This is undesired behaviour on Kubernetes, because the Pod's own IP address is not really useful to any client that's not in the cluster (and even within the cluster most clients will want to use the address of a Service, not a Pod).