Create IPFS Swarm
IPFS Swarm of nodes are ipfs nodes that connect to each others but don't share the same pin set like ipfs cluster.
Using kotal you can create ipfs swarm simply by deploying this swarm mainfest.
Kotal will create an ipfs swarm of 2 nodes, the first node node-1
will use 2 ipfs configuration profiles server
and flatfs
. the second node node-2
wil use only lowpower
ipfs configuration profile.
As you can see from the example swarm above, each node starts with a pre-generated private key privateKey
using ipfs-key tool and indentity id
to make it easy to establish network between the nodes.
After applying the swarm manifest, Kotal will create the swarm deployments, volumes, services ... etc for you. Let's check the swarm's pods
you will get output similar to this
Check the logs of node-1
You will get ouput similar to
Let's send an API call to node-1
, but first lets forward hocalhost:5001
calls to node-1
pod
In another terminal window, send get bootstrap peers
API call
You'll get result similar to this
You can view the ipfs web interface of node-1
by visiting http://localhost:5001/webui in your browser.
Finally you can delete the swarm and all its resources by
and kubernetes garbage collector will delete all resources created by swarm controller.