I have a k8s cluster running several pods, each with IPFS nodes running within - in order to peer explicitly with a single IPFS container from outside the cluster, we came up with a combination of pod cluster ip + pod cluster port along with some rules to prevent these pods from being moved around on restart. Using this information we have successfully peered within the cluster itself.
Which looks something like this:
$ ks describe pod ipfs-1 | grep Node:
Node: ip-192-xyzā¦us-west-2.compute.internal/192-xyz
$ k describe node ip-192-xyzā¦us-west-2.compute.internal | grep ExternalIP:
ExternalIP: 44.222.33.555
^Peering with the above multiaddress from outside the cluster works perfectly.
However, this means that propagation to the public gateways isā¦still an issue since the announced value of āipfs idā contains an internal value. Explicit attempts to call 'ipfs dht provide ā are still not propagated externally.
Ex. of ips id:
ā/ip4/127.0.0.1/tcp/4001/ipfs/QmVyKLpvaā¦ā,
ā/ip4/192.168.3.7/tcp/4001/ipfs/QmVyKLpvaā¦ā
Is there a recommended approach for this specific scenario?
You could set to set your āAnnounceā address to ā/ip4/44.222.33.555/tcp/32639/ipfs/QmVyKLpvaā¦ā in the Addresses section of the IPFS config file.