Cannot access the OpenShift console at http: // ip: 8443

I installed OpenShift Version 3 on CentOS7. I followed the official documentation: https://docs.openshift.org/latest/admin_guide/install/prerequisites.html#configuring-docker-storage

Method 1 (Docker): https://docs.openshift.org/latest/getting_started/administrators.html#installation-methods

I decided to install OpenShift in the Docker container. The last command I had to do was as follows: I start the server in the Docker container using images from the Docker Hub .:

$ docker run -d --name "openshift-origin" --net=host --privileged \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /tmp/openshift:/tmp/openshift \ openshift/origin start 

This command:

  • starts OpenShift listening on all interfaces (0.0.0.0:8443),

  • launches the web console, listening to all interfaces (0.0.0.0:8443),

  • starts the etcd server to store persistent data and

  • launches Kubernetes system components.

     $ sudo docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d3f023085328 openshift/origin "/usr/bin/openshift 2 days ago Up 2 days openshift-origin 

Now I was able to:

 $ sudo docker exec -it openshift-origin bash 

That way I can access openshift in my container. I can create projects and applications, but the state of the state is always on hold. I can not visit https://publicip:8443/console . Anyone who can help me? The OpenShift page loads for a second (when I go http: // publicip: 8443 ), but I get redirect_url up to 10.0.0.x: 8443. My master config looks like this: https://github.com/openshift/origin/ blob / master / test / old-start-configs / v1.0.0 / config / openshift.local.config / master / master-config.yaml . What do i need to change?

url: https://10.0.0.x:8443/oauth/authorize?client_id=openshift-web-console&response_type=token&state=%2F&redirect_uri=https%3A%2F%2F10.0.0.x%3A8443%2Fconsole%2Foauth

EDIT:

 docker run -d --name "origin" \ --privileged --pid=host --net=host \ -v /:/rootfs:ro -v /var/run:/var/run:rw -v /sys:/sys -v /var/lib/docker:/var/lib/docker:rw \ -v /var/lib/origin/openshift.local.volumes:/var/lib/origin/openshift.local.volumes \ openshift/origin start 
+6
source share
2 answers

Maybe I'm wrong, but in order to be able to connect to the container on port 8443 using the host IP address, you need to publish this port on the host. This can be done on the docker launch command by adding the argument -p 8443: 8443

See https://docs.docker.com/reference/commandline/run/

0
source

I have the same problem, but bypassed it using the SSH tunnel.

Try the following:

 ssh -gf -D 8443 <publicip> -N 

And then go to the address you are redirecting to after installing the SOCKS proxy in your browser on localhost:8443

0
source

All Articles