Skip to content
No description, website, or topics provided.
Dockerfile Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


GKE setting for lndmon.

cloud Internet as user
cloud lnd as lnd

node "cluster:lndmon" as cluster {
    node "service" as cluster.service
    node "node:lndmon" as cluster.lndmon {
        node "pod:lndmon" as cluster.lndmon.pod1 {
            node "lndmon" as cluster.lndmon.pod1.lndmon
        node "pod:prometheus" as cluster.lndmon.pod2 {
            node "prometheus" as cluster.prometheus.pod2.prometheus
        node "pod:grafana" as cluster.lndmon.pod3 {
            node "grafana" as cluster.lndmon.pod3.grafana

        node "pod:poststart" as cluster.lndmon.pod4 {
            node "poststart" as cluster.lndmon.pod4.poststart
        node "pv" as cluster.node.pv {
            node "/root/.lnd/" as cluster.node.pv.lndmon
            node "/prometheus/" as cluster.node.pv.prometheus
            node "/var/lib/grafana/" as cluster.node.pv.grafana

user --> cluster.service
cluster.service ---> cluster.lndmon
cluster.lndmon.pod1 <-- cluster.lndmon.pod4
lnd <---- cluster.lndmon.pod1.lndmon
cluster.lndmon.pod1 --> cluster.lndmon.pod2
cluster.lndmon.pod2 --> cluster.lndmon.pod3
cluster.lndmon.pod1.lndmon --> cluster.node.pv.lndmon
cluster.prometheus.pod2.prometheus --> cluster.node.pv.prometheus
cluster.lndmon.pod3.grafana --> cluster.node.pv.grafana


Before start

$ cp .env.sample .env
$ cp prometheus-configmap.yml.sample prometheus-configmap.yml
$ cp StatefulSet.yaml.sample StatefulSet.yaml
  1. Your GKE cluster is created.
  2. LND is runnning with desired settings.
  3. put tls.cert and readonly.macaroon at root directory.
  4. Edit the lndmon/.env LND_HOST variable to match your lnd node's IP and port.
  5. Ensure the other lnd variables are also up-to-date in lndmon/.env.
  6. Edit prometheus-configmap.yml lnd targets section to match your IP.
  7. Edit StatefulSet.yaml porjectID to match your project.

Docker image

Create image.

$ gcloud auth configure-docker
$ docker build -t<projectID>/lndmon:latest .


$ docker push<projectID>/lndmon:latest


Set secrets for cluster.

$ kubectl create secret generic lndmon-secret --from-env-file=.env
$ kubectl create -f prometheus-configmap.yml

Apply yamls.

$ kubectl apply -f StatefulSet.yaml
$ kubectl apply -f Service.yaml

Startup settings.

$ kubectl cp grafana/provisioning lndmon-0:/etc/grafana/ -c grafana
$ kubectl delete pod lndmon-0
$ kubectl exec -it lndmon-0 bash -c lndmon
bash-5.0# cd /bin/
bash-5.0# ./

Then go to, <your id adress>:3000.

You can’t perform that action at this time.