Deploy Chainlink Node
Prerequisites
Ethereum Node
Chainlink node requires access to an EVM chain node with WebSocket server enabled. Here's how to deploy a simple Ethereum Rinkeby node with WebSocket server enabled:
After deploying this node, it can be accessed in-cluster using ws://besu-rinkeby-node:8546
🔥. Read Ethereum guide for more details on how to deploy public and private network nodes.
PostgreSQL Database
Chainlink requires access to PostgreSQL database instance.
You can use a hosted database a service to obtain PostgreSQL database:
You can also deploy your own PostgreSQL database instance from official PostgreSQL docker image.
Keystore and API Password
Chainlink node requires a strong password for securing access to keystore (wallet) and API. We will store this password in Kubernetes secret my-password
:
TLS Certificate
Chainlink optionally requires TLS certificate to secure access to the node API. Using cert-manager we can issue a simple self-signed certificate and store it in a Kubernetes secret:
Deploying Chainlink Node
With access to Ethereum Rinkeby node, PostgreSQL database, tls certificate and a strong password. We're ready to deploy our Chainlink node to create jobs and satisfy requests:
In this manifest, we're describing Chainlink node that connects to Ethereum Rinkeby node using ethereumWsEndpoint
, setting ethereum chain ID using ethereumChainId
, setting link contract address using linkContractAddress
, connecting to postgress database instance using databaseURL
, setting wallet password using keystorePasswordSecretName
which accepts a name of k8s secret, setting tls configuration using certSecretName
which accepts k8s secret name that holds tls.key
and tls.crt
, and finally setting API credentials using apiCredentials
.
Apply chainlink.yaml
manifest:
Kotal operator will notice your chainlink-node
and will create all the necessary pods, persistent volumes, services, configmaps, and secrets neccessary.
You can fetch the deployed Chainlink Node
using:
It will return an output similar to the following:
If you added -o wide
it will return more info like link contract address
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:
Open Chainlink User Interface
Chainlink node comes with a user interface for managing the node, and it's being served by default on port 6688
.
Forward localhost:6688 calls to the node pod:
Open https://localhost:6688 and it will take you to Chainlink node UI. It will ask you for API credentials. Enter the email address in your node's .spec.apiCredentials.email
, and in the password field, enter fE2xXKDnR3ns489X
.
🔥🔥🔥
Finally you can delete the node by:
Kubernetes garbage collector will delete all the resources that has been created by Kotal Chainlink Node
controller.
Last updated