Search code examples
marathondcos

Access public address of a DC/OS service


I deployed a service on DC/OS with the following config

enter image description here

when I access this address (http://eureka.marathon.l4lb.thisdcos.directory:8761/) it says the site can't be reached, although all services are healthy on my dashboard.
How can I access the public IP of the service?

I don't know if it is related or not but when I look into the load balancing config of my public slaves, I get 0 of 2 instances in service


Solution

  • <vip-name>.marathon.l4lb.thisdcos.directory:<vip-port> is the internal named virtual IP, configured with the VIP_0 env var in your example.

    VIPs are not externally exposed. They are made possible via layer 4 name and IP mapping performed by DC/OS components on each node.

    In order to expose a public address you have a few options:

    1. Deploy your app on a public node
    2. Deploy Marathon_LB on a public node and configure your app to be exposed via a virtual host
    3. Set up your own reverse proxy on a public node
    4. Make all your private nodes publicly accessible and then use the host agent node IP and host port
    5. If your app is a Mesos framework, it can register a webui_url for administrative access via the admin router.