Example of a Klever Validator in a Kubernetes Cluster

Why Klever?

Klever promises a range of interesting features.

  • The all-in-one wallet mobile app for blockchain and cryptocurrency
  • No fees — sending and receiving tokens are free
  • The user remains in control of his keys instead of having them managed by a centralized authority
  • Cross-chain trading with Bitcoin and other popular cryptos

Validator Setup

Running a validator is a long-term commitment and requires a great deal of planning and maintenance. On the one hand, being a validator comes with social responsibilities, like participating in governance and being transparent. On the other hand, validating is highly technical. One must not only ensure high availability for optimal uptime and the highest standards of security when handling keys, but also stay on top of things identifying performance bottlenecks, tweaking configuration parameters and sharing knowledge with other validators.

First Things First

As described in the official docs “How to run a node”, we need to run the validator in an isolated environment — a docker container. For this, we first need a docker image, a persistent storage for the “node” folder and a monitoring endpoint. Luckily, all of the above is very easy to set up. The code snippet below defines the StatefulSet of a Klever testnet validator.

# Source: klever/templates/statefulset.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: klever
labels:
helm.sh/chart: klever-1.0.0
app.kubernetes.io/name: klever
app.kubernetes.io/instance: klever
app.kubernetes.io/version: "0.0.5"
app.kubernetes.io/managed-by: Helm
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: klever
app.kubernetes.io/instance: klever
serviceName: klever
template:
metadata:
annotations:
prometheus.io/path: /node/metrics
prometheus.io/port: "8080"
prometheus.io/scrape: "true"
labels:
app.kubernetes.io/name: klever
app.kubernetes.io/instance: klever
blcs-chain: klever
blcs-component: validator
spec:
serviceAccountName: klever
securityContext:
{}
containers:
- name: klever
securityContext:
{}
image: "kleverapp/klever-go-testnet:latest"
imagePullPolicy: Always
args: [ "--port=10230", "--rest-api-interface=0.0.0.0:8080", "--use-log-view" ]
volumeMounts:
- name: data
subPath: config
mountPath: /opt/klever-blockchain/config/node
- name: data
subPath: db
mountPath: /opt/klever-blockchain/db
- name: data
subPath: logs
mountPath: /opt/klever-blockchain/logs
ports:
- name: http
containerPort: 8080
protocol: TCP
resources:
limits:
cpu: 4
memory: 8Gi
requests:
cpu: 500m
memory: 512Mi
volumes:
- name: data
persistentVolumeClaim:
claimName: klever
Rancher UI of Klever Validator
Grafana Klever Testnet Validator Dashboard Example

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store