IPFS: Using Kubernetes

Below you will find instructions for the deployment of nodes ipfs on Kubernetes using HELM. This implies that it will be executed from a local machine on a remote server. The local machine and the remote server will communicate via helm. The installation with kubernetes manifests is compatible with Google Kubernetes Engine .

Minimum System Requirements

Recommended hardware features for IPFS node:

Recommended HardwareOn Mainnet-Omeg
CPU2 vCPUs
RAM Memory2 GB
Hard Disk10 GB SSD
  • Kubernetes: Google Kubernestes Engine GKE.

It is necessary to enable the following network ports in the machine in which we are going to deploy the node:

  • IPFS Peers:
    • 4001: TCP – Port to establish Communication p2p with other peers.

    • 5001: TCP – API Server.

    • 8080: TCP – Gateway server.

Pre-requisites

Install Kubectl

For this installation we will use Kubectl. It is necessary to install Kubectl on a local machine that will perform the installation of the node on a kubernetes cluster.

Following the instructions to install kubectl in your local machine.

Install Helm

For this installation we will use Helm. It is necessary to install helm on a local machine that will perform the installation of the node on a kubernetes cluster.

Following the instructions to install helm in your local machine.

Clone Repository

To configure and install IPFS node, you must clone this git repository in your local machine.

				
					$  git clone https://github.com/LACNetNetworks/ipfs.git
$ cd ipfs/helm/
				
			

Node Installation

Values variable

  • There are four types of values ipfs.yml.

  • The values ​​you have to set are in the deploy section. These are the following:

  • Values:

    • logging: LOGGING – Level logging IPFS (INFO, DEBUG) – default INFO.

    • publicIP: TCP Public IP Ingress.

Set value to environment variable

  • TCP Public IP Ingress: Generate a static public IP in your cloud provider. Then replace the public ip in the load balance (loadBalancerIP) service manifest. finally update the publicIP environment variable with this IP.
  • network: Type Network –  main-net | open-protest-net .

Deploying the new node

  • You need execute the following command:

    Note: This deployment is compalitible only Google Kubernestes Engine GKE

  • To deploy a Node IPFS

				
					$ helm install <chart-name>  ./charts/ipfs-node --namespace  <namespace-name> --create-namespace --values ./values/ipfs.yml 
				
			
  • e.g. deploy IPFS Node on Mainnet-Omega network
				
					  $ helm install bid  ./charts/ipfs-node --namespace  lacnet-ipfs  --create-namespace --values ./values/ipfs.yml
				
			

Checking your connection

You can check if your ipfs node is connected to the network LAC_Net.

Check that the node has stablished the connections with the peers:

for Omega MainNet

				
					
$ curl http://<PUBLIC_IP>:8080/ipfs/QmT7doZQU171dk3XmixagjVrT73dj8MP4XXqLj6EBTWyHA
				
			

You should get a result like this:

				
					  welcome to ipfs LACNet
				
			

 

for Open ProTestNet

				
					
$ curl http://<PUBLIC_IP>:8080/ipfs/QmeLSZuyZK8Gzg5Am2miiPP4vt4cX84aWUeu6uzt96VbXT
				
			

You should get a result like this:

				
					 welcome to ipfs LACNet (open-protest)
				
			

You should get something like this:

Now you can check if the node is runing by getting the log:

				
					$ kubectl logs <pod name> -f --namespace  <namespace-name>
				
			

if you need to update the node, try redeploy the ipfs node: e.g.

				
					$ helm upgrade <chart-name> ./charts/ipfs-node --namespace  <namespace-name>  --values ./values/ipfs.yml 
				
			

If any of these two checks doesn’t work, try to restart the ipfs service: e.g.

				
					$ kubectl delete pod <pod name> -n <namespace>
				
			

If that doesn’t solve the problem, open a ticket if you already have a membership or contact us at [email protected].

Contact

For any issues, you can either go to issues or e-mail us at [email protected]. Any feedback is more than welcome!

Copyright 2024 © All rights Reserved. Designed by LACNet