How to access externally to consul UI

后端 未结 6 1800
小蘑菇
小蘑菇 2020-12-24 07:54

How can I access to consul UI externally?

I want to access consul UI writing

:8500

I have try doing

相关标签:
6条回答
  • 2020-12-24 08:25

    I run it as a docker image, i gave

    docker pull consul
    
    docker run -p 8500:8500 consul
    

    and i am able to access the consul ui at http://<hostname>:8500/ui

    0 讨论(0)
  • 2020-12-24 08:26

    Finally I find the solution. Add to the config file with the bind addr that is the IP of the machine, and the client_addr that is the hosts he listen to. So I use 0.0.0.0 to listen to all the IPs.

    "bind_addr":"<machine-ip>",
    "client_addr":"0.0.0.0",
    
    0 讨论(0)
  • 2020-12-24 08:31

    No way to get User Interface if ther no user interface ) Classic UI its some stack of Desktop Environment(x-term....), so before get, you need install it on node

    0 讨论(0)
  • 2020-12-24 08:33

    Add

    {
      "client_addr": "0.0.0.0"
    }
    

    to your configuration or add the option -client 0.0.0.0 to the command line of consul to make your Web UI accessible from the outside (see the docs for more information).

    Please note that this will also make your Consul REST API accessible from the outside. Depending on your environment you might want to activate Consul's ACLs to restrict access.

    0 讨论(0)
  • 2020-12-24 08:34

    You can use socat in this case.

    socat -d -d TCP-L:8500,bind=172.16.93.128,fork TCP:localhost:8500 &

    where 172.16.93.12 is my IP.

    0 讨论(0)
  • 2020-12-24 08:35

    I don't have hands-on experience with Consul yet, but here are a few tips:

    • Run sudo netstat -peanut | grep :8500 and check if Consul is bound to 0.0.0.0 or an explicit ip. Should check docs if this is configurable.
    • On each node install Squid, Nginx or any other software which can act as a HTTP proxy
    0 讨论(0)
提交回复
热议问题