Deploy Polkadot Node

Deploy Polkadot Node

The following manifest describes a Polkadot node that syncs Polkadot relay chain network: polkadot, enables HTTP JSON-RPC server rpc: true on custom port rpcPort: 8888, and uses Parity Polkadot client:

polkadot.yaml
apiVersion: polkadot.kotal.io/v1alpha1
kind: Node
metadata:
  name: polkadot-node
spec:
  network: polkadot
  rpc: true
  rpcPort: 8888

Apply polkadot.yaml manifest:

kubectl apply -f polkadot.yaml

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

You can fetch the deployed Polkadot Node using:

kubectl get nodes.polkadot

It will return an output similar to the following:

NAME             NETWORK     VALIDATOR
polkadot-node    polkadot    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

Forward localhost:8888 calls to the node pod because rpcPort: 8888:

In another terminal window call eth_getBlock JSON-RPC method to get the latest synced block:

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 Polkadot Node controller.

Last updated

Was this helpful?