In order to map a marathon task to a service entry in Marathon-LB, it must be allocated a servicePort by Marathon. I have noticed that Marathon is only allocating servicePorts to Docker Containerizer tasks. It is not allocating servicePorts to Unified Containerizer tasks.
As a base case, the the following sample app.json launches a docker containerizer task, which is correctly given a servicePort:
I see the task's assigned servicePort in its marathon information:
When the above application is launched with the necessary HAPROXY_* labels, it works as expected with Marathon-LB.
However, the following similar Unified Containerizer task is not assigned a servicePort:
No servicePort is assigned:
When the above application is launched with the necessary HAPROXY_* labels, it is not mapped to a service in Marathon-LB (since it does not have a servicePort to assign it to.)
cc: James DeFelice