Home

Awesome

IoTeX Node in Kubernetes

IoTeX is a decentralized cryptosystem, a new generation of blockchain platform for the development of the Internet of things (IoT). The project team is sure that the users do not have such an application that would motivate to implement the technology of the Internet of things in life. And while this will not be created, people will not have the desire to spend money and time on IoT. The developers of IoTeX decided to implement not the application itself, but the platform for creation. It is through the platform that innovative steps in the space of the Internet of things will be encouraged.

Introduction

This chart bootstraps a single IoTeX node deployment on a Kubernetes cluster using the Helm package manager. Docker image was taken from IoTeX on Docker hub

Prerequisites

Creating GKE Kubernetes Cluster

CLUSTER_INDEX=0
CLUSTER_NAME=iotex-node-${CLUSTER_INDEX} && echo "Cluster name is ${CLUSTER_NAME}"
MASTER_ZONE=us-central1-a

gcloud container clusters create $CLUSTER_NAME \
    --num-nodes 1 \
    --enable-autoscaling --max-nodes=1 --min-nodes=1 \
    --machine-type=n1-standard-1 \
    --cluster-version latest \
    --enable-autorepair \
    --enable-ip-alias \
    --zone=$MASTER_ZONE

gcloud container clusters get-credentials $CLUSTER_NAME --zone=$MASTER_ZONE

kubectl create -f storageclass-ssd.yaml 
helm init
bash patch-tiller.sh

Installing the Chart

To install the chart with the release name iotex:

$ helm install --name iotex charts/iotex

The command deploys IoTeX on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the iotex deployment:

$ helm delete iotex --purge

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following table lists the configurable parameters of the iotex chart and their default values.

ParameterDescriptionDefault
image.repositoryImage source repository nameiotex/iotex-core
image.tagiotex release tag.v1.0.0
image.pullPolicyImage pull policyIfNotPresent
service.rpcPortRPC port14014
service.p2pPortP2P port4689
persistence.enabledCreate a volume to store datatrue
persistence.accessModeReadWriteOnce or ReadOnlyReadWriteOnce
persistence.sizeSize of persistent volume claim100Gi
resourcesCPU/Memory resource requests/limits{}
terminationGracePeriodSecondsWait time before forcefully terminating container30

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

$ helm install --name iotex ./iotex

Tip: You can use the default values.yaml

Check a separate file for more details about additional troubleshooting.