Openshift Console redirects to 127.0.0.1
As I spent about an hour this issue I imagine I will not be the only one.
When trying to go to the OpenShift console on a remote machine with http://<IP or hostname>:8443/console
it redirects you to 127.0.0.1.
This happens if you have already completed one install without setting the public host. The easiest way to fix this is by following these steps.
Warning This will nuke your cluster
- oc cluster down
- delete the OpenShift.local.clusterup directory
rm -rf OpenShift.local.clusterup
- redeploy the cluster
ov cluster up --public-hostname=<IP or hostname>
- go to
http://<IP or hostname>:8443/console
In order to give full credit where it is due, I found the solution here https://github.com/openshift/origin/issues/20726#issuecomment-467464588