Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Latest commit

 

History

History
89 lines (56 loc) · 2.2 KB

testing-with-nfs.md

File metadata and controls

89 lines (56 loc) · 2.2 KB

Testing beacon node and validator with k8s manifests and NFS

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.

Prerequisite

Prepare the storage and manifests

  1. Create the data folders for beacon node and validator (and/or validator keys and secrets) on NFS.

  2. Import validator keys.

  3. Change the directory ownership. Assume the created data folders are under /data:

    chown -R 1001:2000 /data
  4. Export the data directories:

    # Edit /etc/exports and add the created folders.
    sudo nano /etc/exports
    
    sudo exportfs -a 
  5. Clone this repo.

    git clone https://github.com/lumostone/eth2xk8s.git
  6. Go the directory of the target client.

  7. Review all manifests and change the values if needed.

Config the cluster

  1. Create namespace. Remember to change <namespace> to the same namespace value as in the manifests.

    kubectl create namespace <namespace>
  2. Apply the manifests to create RBAC resources.

    microk8s kubectl apply -f rbac.yaml

Deploy beacon node and validator clients

For Nimbus, create the Nimbus client with the following command:

kubectl apply -f nimbus-deployment.yaml

For Prysm:

  1. Create the beacon node and expose it as a service for validator client.

    kubectl apply -f beacon-deployment.yaml -f beacon-service.yaml
  2. Create the validator client and wallet secret.

    kubectl apply -f wallet-secret.yaml -f validator-deployment.yaml

For Lighthouse and Teku:

  1. Create the beacon node and expose it as a service for validator client.

    kubectl apply -f beacon-deployment.yaml -f beacon-service.yaml
  2. Create the validator client.

    kubectl apply -f validator-deployment.yaml