Unable to route to service in namespace other than default

I have a service service1 under namespace ns1 in my k8s environment. I am unable to route to the service, find the below configuration.

linkerd

    routers:
    - protocol: http
      label: outgoing
      dtab: |
        /k8s => /#/io.l5d.k8s ; 
        /svc => /$/io.buoyant.http.domainToPathPfx/k8s ;

curl

http_proxy=$(kubectl get svc l5d -o jsonpath="{.status.loadBalancer.ingress[0].*}"):4140 curl -H "Host: service1.4140.ns1" service1

response
No hosts are available for /svc/service1, Dtab.base=[/k8s=>/#/io.l5d.k8s;/svc=>/$/io.buoyant.http.domainToPathPfx/k8s], Dtab.local=[]. Remote Info: Not Available

dtab
From the web console’s delegator I see that I am able to route the service!

Answered on slack, but posting the answer here for posterity:

when using http_proxy, the host header is taken from the host you specify. so I think your curl command should be

http_proxy=$(kubectl get svc l5d -o jsonpath="{.status.loadBalancer.ingress[0].*}"):4140 curl service1.http.ns1

1 Like

Awesome! Thanks Alex!