Gke, traefik and ipfs node (0.6.0)


I’m trying to expose an ipfs node on a gke cluster by using Traefik as reverse proxy.
The Traefik instance is exposed to the internet with a gcp l4 loadbalancer, the ipfs node swarm port is added to Traefik with a TCP Route. A headless Kubernetes service does the link between the TCP route and the pod hosting the ifps daemon.

I can successfully make a connection on the Traefik IP with telnet on the swarm port:

⇒ telnet 4001
Connected to
Escape character is ‘^]’.
�^� �U�`Q’��+��$�W~�AR�p�

However, when I try to request the dht from an other node, I get following error:

root@swarmpool-c2-traefik-swarm-c2-traefik-public-ss-0:/# ipfs dht findpeer QmSVjca1eEcC3RCa8fT3g99VZoF4E5tBxYDSGvcms8Tybw
Error: routing: not found

And if I try to connect to the peer, I get:
root@swarmpool-c2-traefik-swarm-c2-traefik-public-ss-0:/# ipfs swarm connect /ip4/
connect QmSVjca1eEcC3RCa8fT3g99VZoF4E5tBxYDSGvcms8Tybw success

But a:
root@swarmpool-c2-traefik-swarm-c2-traefik-public-ss-0:/# ipfs swarm peers

returns nothing …

Any idea about what is going on here ?

Thanks for your help

Edit: I also tried with a 0.4.23 node; in this case, I can’t successfully connect to the swarm port with telnet, I get a ‘connection reset by peer’ error

That node probably does not know it is diallable, therefore it runs in dht-client mode. Does ipfs id in the gke cluster node show the public IP/port in Addresses ?

Yes it does, I manually set this value with
ipfs config --json Addresses.Announce $ADDRESS

root@swarmpool-c1-traefik-swarm-c1-traefik-public-ss-0:/# ipfs id
“ID”: “QmSVjca1eEcC3RCa8fT3g99VZoF4E5tBxYDSGvcms8Tybw”,
“PublicKey”: “CAASpgIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6JF0qeF6yvH3aCkeYiA+GVbyi6muuNqV1w+aEzzmpdm6/LK645uCW9tftqdFhflKz1r6GBIuMR0Ib/nAzH1hQitxJLx3YWxC87tLb8IJzJ1O6FxicW/+htn+cX1CSowk98y2fjfC84kzQbfG/s/yiX8R/KkGmApOOEdTcQRaR846jlO8nDzi2mVPeD1cIAxAolphbCqvKRGqTE7CJDMI6yW3tD/j6waNqodHBNgwVg/vaiIkttOahuy+TbWEpdTVwDLANTHoo6yuBG0aJhG3BCbdznTRXYBWCo6sgso1zZrqTfpOzTFoPO0R8D0vUK7Tx5IuY0XE/ATYFZe7MYN7TAgMBAAE=”,
“Addresses”: [
“AgentVersion”: “go-ipfs/0.6.0/d6e036a88”,
“ProtocolVersion”: “ipfs/0.1.0”

When I do the same thing without going through Traefik (exposing directly with a L4 gcp loadbalancer), it works fine