geth

by paradeum-team

Helm chartv0.2.12App 1.10.26MITVerified publisher

A Helm chart for Ethereum geth client

About this chart

geth

Helm chart deploying Ethereum Go.

TL;DR

$ helm repo add vulcanlink https://vulcanlink.github.io/charts/
$ helm install my-release vulcanlink/geth

Introduction

This chart bootstraps a geth deployment on a Kubernetes cluster using the Helm package manager.

Vulcan Link charts can be used with Kubeapps for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress on top of AWS EKS.

Prerequisites

  • Kubernetes 1.12+
  • Helm 2.12+ or Helm 3.0-beta3+
  • PV provisioner support in the underlying infrastructure

Initial setup

Identify the Kubernetes worker nodes that should be used to execute user containers. Do this by labeling each node with geth/role=node. If you have a multi-node cluster, for each node <NODE_NAME> you want to be a node, execute

kubectl label nodes <NODE_NAME> geth/role=node

For a single node cluster, simply do

kubectl label nodes --all geth/role=node

Installing the Chart

To install the chart with the release name my-release:

$ helm install my-release vulcanlink/geth

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

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

The command removes all the Kubernetes components but PVC's associated with the chart and deletes the release.

To delete the PVC's associated with my-release:

$ kubectl delete pvc -l release=my-release

Note: Deleting the PVC's will delete blockchain data as well. Please be cautious before doing it.

Parameters

The following tables lists the configurable parameters of the geth chart and their default values.

ParameterDescriptionDefault
global.imageRegistryGlobal Docker Image registrynil
global.imagePullSecretsGlobal Docker registry secret names as an array[] (does not add image pull secrets to deployed pods)
global.storageClassGlobal storage class for dynamic provisioningnil
image.registryImage registrydocker.io
image.repositoryImage namegeth/geth
image.tagImage tag{TAG_NAME}
image.pullPolicyImage pull policyIfNotPresent
image.pullSecretsSpecify Image pull secretsnil (does not add image pull secrets to deployed pods)
image.commandSpecify Image run commandnil
image.argsSpecify Image run command args["--rpc", "--rpcaddr", "0.0.0.0", "--rpcvhosts=*", "--ws", "--wsaddr", "0.0.0.0", "--wsorigins=*"]
nameOverrideString to partially override postgresql.fullname template with a string (will prepend the release name)nil
fullnameOverrideString to fully override postgresql.fullname template with a stringnil
volumes.data.mountPathBlockchain data mountpath/root/.ethereum
container.httpgeth Container http JSON-RPC port8545
container.wsgeth Container websocket JSON-RPC port8546
service.typeKubernetes Service typeClusterIP
service.httpgeth Service http JSON-RPC port8545
service.wsgeth Service websocket JSON-RPC port8546
service.nodePortKubernetes Service nodePortnil
service.annotationsAnnotations for geth service{} (evaluated as a template)
persistence.enabledEnable persistence using PVCtrue
persistence.existingClaimProvide an existing PersistentVolumeClaim, the value is evaluated as a template.nil
persistence.storageClassPVC Storage Class for geth volumenil
persistence.accessModesPVC Access Mode for geth volume[ReadWriteOnce]
persistence.sizePVC Storage Request for geth volume300Gi
persistence.annotationsAnnotations for the PVC{}
keySet key in the Ethereum keystore""
passwordSet password for the key in the Ethereum keystore""

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

$ helm install my-release \
  --set persistence.enabled=false \
    vulcanlink/geth

The above command disables persistent storage, meaning the node will have to resync after every Pod restart/deletion.

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

$ helm install my-release -f values.yaml vulcanlink/geth

Tip: You can use the default values.yaml

Deploy geth with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has geth on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartgeth is pinned at v0.2.12 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply