Deploy Public Rinkeby Node

Deploy Rinkeby Node

Rinkeby is a Proof of Authority public Ethereum test network, used by developers to test their dApps.
The following manifest describes an Ethereum node that joins rinkeby network network: rinkeby, and uses Hyperledger Besu client client: besu:
rinkeby.yaml
1
apiVersion: ethereum.kotal.io/v1alpha1
2
kind: Node
3
metadata:
4
name: rinkeby-besu-node
5
spec:
6
network: rinkeby
7
client: besu
Copied!
Joining any Ethereum network is as easy as setting node's spec.network value, which accepts values like mainnet, rinkeby, goerli, xdai ... etc. After the node is created, you can't change spec.network.
Apply rinkeby.yaml manifest:
1
kubectl apply -f rinkeby.yaml
Copied!
Kotal operator will notice your rinkeby-besu-node and will create all the necessary pods, persistent volumes, services, configmaps, and secrets neccessary.
You can fetch the deployed Ethereum Node using:
1
kubectl get nodes.ethereum
Copied!
It will return an output similar to the following:
1
NAME CLIENT Consensus Network
2
rinkeby-besu-node besu poa rinkeby
Copied!

Fetch Node Logs

Get the pods that has been created by Kotal for the node:
1
kubectl get pods
Copied!
It will return an output similar to the following:
1
NAME READY STATUS RESTARTS AGE
2
rinkeby-besu-node-0 1/1 Running 0 1m
Copied!
If pod STATUS is Pending, most probably it's due to not enough cpu and memory, because Kotal allocates lots of cpu cores and memory for public nodes. The required node resources can be changed using spec.resources.cpu, spec.resources.memory, and spec.resources.storage.
Get the logs of the running node:
1
kubectl logs -f rinkeby-besu-node-0
Copied!

Call JSON-RPC Method

Let's update our node by enabling JSON-RPC HTTP server:
rinkeby.yaml
1
apiVersion: ethereum.kotal.io/v1alpha1
2
kind: Node
3
metadata:
4
name: rinkeby-besu-node
5
spec:
6
network: rinkeby
7
client: besu
8
rpc: true
Copied!
Kotal defaults node missing spec parameters like:
    JSON-RPC HTTP server port is defaulted to 8545.
    JSON-RPC HTTP server enabled modules are defaulted to: eth, net, and web3.
    Blocks Synchronization mode is defauled to fast in public networks.
For a comprehensive reference on Ethereum Node and default spec parameter values, check our ethereum reference​
Apply the new version of rinkeby.yaml:
1
kubectl apply -f rinkeby.yaml
Copied!
Forward localhost:8545 calls to the node pod:
1
kubectl port-forward rinkeby-besu-node-0 8545
Copied!
In another terminal window call eth_syncing JSON-RPC method
1
curl -X POST -H 'content-type: application/json' --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":32}' http://127.0.0.1:8545
Copied!
You will get JSON result similar to the following:
1
{
2
"jsonrpc" : "2.0",
3
"id" : 32,
4
"result" : {
5
"startingBlock" : "0x0",
6
"currentBlock" : "0x1518",
7
"highestBlock" : "0x9567a3",
8
"pulledStates" : "0x203ca",
9
"knownStates" : "0x200636"
10
}
11
}
Copied!
Finally you can delete the node by:
1
kubectl delete -f rinkeby.yaml
2
​
3
node.ethereum.kotal.io "rinkeby-besu-node" deleted
Copied!
Kubernetes garbage collector will delete all the resources that has been created by Kotal Ethereum Node controller.
Last modified 10d ago