This example demonstrates how to run one validator client and one beacon node using in a single node kubernetes cluster with MicroK8s. This setup uses NFS to store beacon and validator's data. Please note this configuration is for testing only.
- Install MicroK8s
- Set up NFS (Example: Guide for NFS installation and configuration on Ubuntu).
-
Create the data folders for beacon node and validator (and/or validator keys and secrets) on NFS.
-
Import validator keys.
-
Change the directory ownership. Assume the created data folders are under
/data
:chown -R 1001:2000 /data
-
Export the data directories:
# Edit /etc/exports and add the created folders. sudo nano /etc/exports sudo exportfs -a
-
Clone this repo.
git clone https://github.com/lumostone/eth2xk8s.git
-
Go the directory of the target client.
-
Review all manifests and change the values if needed.
-
Create namespace. Remember to change
<namespace>
to the same namespace value as in the manifests.kubectl create namespace <namespace>
-
Apply the manifests to create RBAC resources.
microk8s kubectl apply -f rbac.yaml
For Nimbus, create the Nimbus client with the following command:
kubectl apply -f nimbus-deployment.yaml
For Prysm:
-
Create the beacon node and expose it as a service for validator client.
kubectl apply -f beacon-deployment.yaml -f beacon-service.yaml
-
Create the validator client and wallet secret.
kubectl apply -f wallet-secret.yaml -f validator-deployment.yaml
For Lighthouse and Teku:
-
Create the beacon node and expose it as a service for validator client.
kubectl apply -f beacon-deployment.yaml -f beacon-service.yaml
-
Create the validator client.
kubectl apply -f validator-deployment.yaml