Running geth on kubernetes

7/27/2018

I am running geth full node https://github.com/ethereum/go-ethereum/wiki/geth on Google Cloud platform on a VM instance. Currently, I have mounted a SSD and write the chain data to it.

I want to now run it on multiple VM instances and use a load balancer for serving the requests made by Dapp. I can do this using a normal load balancer and create VMs and autoscale. However, I have the following questions:

  1. SSD seems to be a very important part of blockchain syncing speed. If I simply create VM images and add it for autoscaling, it won't help much because the blockchain will take time to sync.
  2. If I want to run these nodes on kubernetes cluster, what's the best way to use the disk?
-- kosta
go-ethereum
google-kubernetes-engine
kubernetes

1 Answer

8/2/2018

Take a look at this Kubernetes Engine tutorial which shows you how to run StatefulSets with automatic persistent volume provisioning: https://cloud.google.com/kubernetes-engine/docs/how-to/stateful-apps

Take a look at this Kubernetes Engine tutorial which shows you how to provision SSD disks https://cloud.google.com/kubernetes-engine/docs/concepts/persistent-volumes#ssd_persistent_disks

With these + HorizontalPodAutoscaler, you should be able to create a StatefulSet with auto-scaling and each pod will get its own SSD disk.

-- AhmetB - Google
Source: StackOverflow