This project deploys a fully featured, best practices Eth2 validator setup on Google Kubernetes Engine.
We help you deploy and manage a complete Eth2 validator infrastructure for you. Hire us.
This is a Kubernetes private cluster with two nodes located in two Google Cloud zones, in the same region.
The validator node uses a Regional Persistent Disk so it can be respun quickly in the other node from the pool if the first node goes offline for any reason, for example base OS upgrade.
The setup is production hardened:
- usage of kubernetes secrets to store sensitive values such as node keys. They are created securely from terraform variables,
- network policies to restrict communication between pods. For example, only sentries can peer with the validator node.
Deploying will incur Google Compute Engine charges, specifically:
- virtual machines
- regional persistent SSD storage
- network ingress
- NAT forwarding
WARNING: Eth2 tokens have value. Use judgement and care in your network interactions, otherwise loss of funds may occur.
-
Download and install Terraform
-
Download, install, and configure the Google Cloud SDK.
-
Install the kubernetes CLI (aka
kubectl)
Using your Google account, active your Google Cloud access.
Login to gcloud using gcloud auth login
Set up Google Default Application Credentials by issuing the command:
gcloud auth application-default login
NOTE: for production deployments, the method above is not recommended. Instead, you should use a Terraform service account following these instructions.
All custom values unique to your deployment are set as terraform variables. You must populate these variables manually before deploying the setup.
A simple way is to populate a file called terraform.tfvars in the terraform folder.
NOTE: terraform.tfvars is not recommended for a production deployment. See production hardening.
- Run the following:
cd terraform
terraform init
terraform plan -out plan.out
terraform apply plan.out
This will take time as it will:
- create a Kubernetes cluster
- build the necessary containers
- download and unzip the archives if applicable
- spin up the sentry and validator nodes
- sync the network
To delete everything and terminate all the charges, issue the command:
terraform destroy
Alternatively, go to the GCP console and delete the project.
