Deploy IPFS peer
Deploy Peer
apiVersion: ipfs.kotal.io/v1alpha1
kind: Peer
metadata:
name: simple-peer
spec: {}This is a simple ipfs peer that joins the public ipfs swarm, and will starts with the all default settings that's similar to running ipfs init then ipfs daemon on your machine.
Let's deploy the peer:
kubectl apply -f peer.yamlKotal operator will notice your simple-peer and will create all the necessary pods, persistent volumes, services, configmaps, and secrets.
kubectl get peersIt will return an output similar to the following:
NAME CLIENT
simple-peer go-ipfsFetch Peer Logs
Get the pods created for the peer:
kubectl get podsIt will return an output similar to the following:
Check the logs of the running peer:
You'll get output similar to the following:
Your peer is up and running and ready to receive api calls.
Read file Using IPFS HTTP API
Let's forward localhost:5001 calls to simple-peer:5001
In another terminal window, send http api call using cURL:
You'll get the following output:
You can also view ipfs webui by visiting http://0.0.0.0:5001/webui
Finally, delete the ipfs peer:
Kubernetes garbage collector will delete all the resources that has been created by Kotal IPFS Peer controller.
Last updated
Was this helpful?