Deploy NEAR RPC Node

Deploy RPC Node

The following manifest describes a NEAR node that syncs NEAR mainnet network: mainnet, enables HTTP JSON-RPC server rpc: true and uses NEAR Core client:

near.yaml
apiVersion: near.kotal.io/v1alpha1
kind: Node
metadata:
  name: near-node
spec:
  network: mainnet
  rpc: true

Apply near.yaml manifest:

kubectl apply -f near.yaml

Kotal operator will notice your near-node and will create all the necessary pods, persistent volumes, services, configmaps, and secrets neccessary.

You can fetch the deployed NEAR Node using:

kubectl get nodes.near

It will return an output similar to the following:

NAME         NETWORK    CLIENT      VALIDATOR
near-node    mainnet    nearcore    fasle

Fetch Node Logs

Get the pods that has been created by Kotal for the node:

It will return an output similar to the following:

Get the logs of the running node:

It will return node logs similar to the following:

Call JSON-RPC Method

By default, NEAR node JSON-RPC server port is 3030, which can be changed using rpcPort.

Forward localhost:3030 calls to the node pod:

In another terminal window call status JSON-RPC method to get the general status of our node (sync status, nearcore node version, protocol version) and the current set of validators:

You will get JSON result similar to the following:

Finally you can delete the node by:

Kubernetes garbage collector will delete all the resources that has been created by Kotal NEAR Node controller.

Last updated

Was this helpful?