Skip to content




vlab monitoring


Table of Content

vlab monitoring

Use "kube-prometheus".

https://github.com/prometheus-operator/kube-prometheus

Prepare a dedicated repository, "gitops/monitoring" on my GitLab.

cd ~/repos/cp.blink-1x52.net/gitops/
git clone https://cp.blink-1x52.net/gitops/monitoring.git
cd monitoring

jb (jsonnet-builder) and related components

https://github.com/jsonnet-bundler/jsonnet-bundler#install

mise use [email protected]

go install -a github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest
go install github.com/google/go-jsonnet/cmd/jsonnet@latest
go install github.com/brancz/gojsontoyaml@latest

setup kube-prometheus jsonnet

jb init
jb install github.com/prometheus-operator/kube-prometheus/jsonnet/kube-prometheus@main

wget https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/example.jsonnet -O example.jsonnet
wget https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/build.sh -O build.sh
chmod +x build.sh

# update kube-prometheus dependencies
jb update

build script to generate manifest files

./build.sh example.jsonnet