Error lookup traefik-hub.hub-agent.svc.cluster.local

I tried setting up hub in a test cluster, following the docs.

I registered a test service, but when making a request at that URL, I can see that hub-agent-tunnel pod logs this error:

{"level":"error","error":"dial: dial tcp: lookup traefik-hub.hub-agent.svc.cluster.local on no such host","time":1668875101,"message":"Unable to proxy the tunnel traffic to the cluster endpoint"}

I don't have a service called traefik-hub in the traefik-hub namespace, here's what I have:

❯ kubectl -n hub-agent get service
NAME                    TYPE           CLUSTER-IP       EXTERNAL-IP      PORT(S)   AGE
hub-agent-auth-server   ClusterIP   <none>           80/TCP    5m
hub-agent-controller    ClusterIP   <none>           443/TCP   5m
hub-catch-all           ExternalName   <none>    443/TCP   5m

I'm pretty sure I've followed all the guides, anyone know what I can have done wrong?

I think I found it. The hub's helm chart has a default setting
tunnelDeployment.traefik.tunnelHost: traefik-hub.traefik-hub.svc.cluster.local. This would only make sense if running traefik in a namespace called traefik-hub.

Hey @trond, we have someone investigating what may have happened here. They will get back to you soon, I just wanted you to know it is happening. :slight_smile:


Yes, you were on the right track.
We've tried reproducing what we thought was your use case, i.e. setting up traefik through helm with a namespace that is not "hub-agent", with:

mbp:traefik mpl$ helm upgrade --install traefik traefik/traefik --namespace foo --create-namespace --set hub.enabled=true --set ports.web=null --set ports.websecure=null
Release "traefik" does not exist. Installing it now.
NAME: traefik
LAST DEPLOYED: Thu Nov 24 15:33:19 2022
STATUS: deployed
Traefik Proxy v2.9.4 has been deployed successfully
on foo namespace !

Traefik Hub integration is enabled ! With your specific parameters,
`metricsURL`, `tunnelHost` and `tunnelPort` needs to be set accordingly
on hub-agent Helm Chart. Based on this Chart, it should be:

  --set \
  --set \
  --set tunnelDeployment.traefik.tunnelPort=9901 \


And as you can see, it now detects that the namespace is not "hub-agent", and therefore outputs the settings that one should use when setting the hub agent afterwards, which we then did:

mbp:traefik mpl$ helm upgrade --install hub-agent traefik/hub-agent \
 --set token="0a5f823d-c755-4e82-836e-a913eb598dc7" --namespace hub-agent \
   --set \
   --set \
   --set tunnelDeployment.traefik.tunnelPort=9901 \
Release "hub-agent" does not exist. Installing it now.
NAME: hub-agent
LAST DEPLOYED: Thu Nov 24 15:40:28 2022
NAMESPACE: hub-agent
STATUS: deployed
Hub Agent v1.0.0 has been deployed successfully
on the hub-agent namespace!

You can read more about configuring Traefik to work with Hub in the documentation

which seems to work.
Have you tried a similar approach and succeeded with it?

Im not sure I understand.

It seems as those we did the same approach, so no it has not succeeded unless I misunderstand the question