0

I have deployed Private IPFS cluster in kubernetes with clusterIP service.

I am able to add and access files to ipfs using ipfs-cluster-ctl command line tool by port-forwarding the ClusterIP service to the local.

Now I have created an ingress which will redirect the requests to the ClusterIP service. But, unable to add and view the files using ingress. Used haproxy ingress controller for my cluster.

For eg, my ipfs ingress endpoint is abc.ipfs.example.com. I am trying to access it using https://abc.ipfs.example.com/ipfs/CID, which is not working.

Attaching the error that I am getting while accessing the ingress url in browser,

enter image description here

Also, attaching the ingress configuration here,

enter image description here

Can anyone please help me to achieve my need? Thanks in Advance.

Soundarya
  • 153
  • 1
  • 2
  • 12
  • What do you mean by not working? Is it throwing 404 or 401 or showing blank page? – CuriousMind Oct 17 '22 at 07:25
  • Hey @CuriousMind Thanks for your reply. I am getting "503 Service Unavailable" error if I try to access the url https://abc.ipfs.example.com/ipfs/CID in browser. Added the screenshot in the post. Please find the attachment for your reference. – Soundarya Oct 17 '22 at 07:30
  • What is your ingress configuration? can you add that to question? – CuriousMind Oct 17 '22 at 08:03
  • Added the yaml configuration that I used to create ipfs ingress in the post above. – Soundarya Oct 17 '22 at 11:09
  • Is there a typo in configuration for service name and port? Instead of using `service` block with `name` and `port`, shouldn't you be using `serviceName` and `servicePort` - check link- https://www.haproxy.com/documentation/kubernetes/latest/configuration/ingressclass/ – CuriousMind Oct 17 '22 at 12:29
  • Since I am using the k8s version higher than 1.19, the syntax has changed. So, if I used like serviceName and servicePort, getting error as `"error validating data: [ValidationError(Ingress.spec.rules[0].http.paths[0].backend): unknown field "serviceName" in io.k8s.api.networking.v1.IngressBackend, ValidationError(Ingress.spec.rules[0].http.paths[0].backend): unknown field "servicePort" in io.k8s.api.networking.v1.IngressBackend]; if you choose to ignore these errors, turn validation off with --validate=false"`. – Soundarya Oct 18 '22 at 04:25
  • @CuriousMind For your reference, https://stackoverflow.com/questions/64125048/get-error-unknown-field-servicename-in-io-k8s-api-networking-v1-ingressbacken – Soundarya Oct 18 '22 at 04:25
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/248869/discussion-between-soundarya-and-curiousmind). – Soundarya Oct 18 '22 at 04:25

0 Answers0