For over half a decade, I have been deploying IPFS on my Kubernetes cluster, gaining valuable insights into its operation within such an environment. Even though it’s just a modest singleton deployment, the experience has led to a deeper understanding of various nuances and potential pitfalls. This article aims to share the learned lessons and offer configuration guidelines to optimize IPFS performance in a Kubernetes setup.
Nice article! A few comments:
StatefulSet
, instead of aDeployment
.proxy_cache
directive to nginx. IPFS content is all static, so there’s no reason to go back to Kubo for serving static files when nginx can do this significantly faster. In your current config, nginx is terminating TLS and passing through everything else.Thanks for the tips. Will look into improving my setup.
My gateway is super locked down. I whitelist specific routes for my content. I tried to do a public gateway but it was far too costly. 😃
The proxy_cache is a great idea, probably do that right away.
Awesome! One idea: If you are pinning content on this node too, look into using the Kubo
NoFetch
parameter. This will instruct Kubo to only serve content it has pinned via the gateway port.Good call, NoFetch worked perfectly.
Can’t say that about the proxy_cache, when I enable it, nothing gets served. Unfortunately the docs are either not quite right, or old.
Any chance you have some up to date docs on adding it?
Are you using nginx-ingress or ingress-nginx?
I am using the latest ingress-nginx.