Home

Awesome

Tezos Node in Kubernetes

Tezos is a distributed consensus platform with meta-consensus capability. Tezos not only comes to consensus about the state of its ledger, like Bitcoin or Ethereum. It also attempts to come to consensus about how the protocol and the nodes should adapt and upgrade.

Introduction

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

Prerequisites

Creating GKE Kubernetes Cluster

CLUSTER_INDEX=0
CLUSTER_NAME=tezos-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-2 \
    --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 tezos:

$ helm install --name tezos charts/tezos

Follow the instructions in the output of the command to connect to Tezos RPC.

The command deploys Tezos 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 tezos deployment:

$ helm delete tezos --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 Tezos chart and their default values.

ParameterDescriptionDefault
image.repositoryImage source repository nametezos/tezos
image.tagtezos release tag.latest-release
image.pullPolicyImage pull policyIfNotPresent
service.rpcPortRPC port8732
service.p2pPortP2P port9732
persistence.enabledCreate a volume to store datatrue
persistence.accessModeReadWriteOnce or ReadOnlyReadWriteOnce
persistence.sizeSize of persistent volume claim200Gi
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 tezos -f values.yaml charts/tezos

Tip: You can use the default values.yaml

Check a separate file for more details about additional troubleshooting.