Skip to content

roelandvanbatenburg/kube-prometheus-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kube-prometheus-builder

Docker image to help build kube-prometheus.

Instead of having to install go and the jsonnet stuff locally you can use this image when customizing your kube-prometheus installation.

See https://github.com/prometheus-operator/kube-prometheus/blob/main/docs/customizing.md for details.

Usage

  1. Obtain kube-prometheus and make required changes.
  2. Acquire build.sh from kube-prometheus: wget https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/build.sh -O build.sh
  3. Create create_manifests.sh with this content:
# Update the image
docker pull ghcr.io/roelandvanbatenburg/kube-prometheus-builder
# Update jsonnet-bundler inside the docker container, this creates a vendor directory
docker run --rm -v "$(pwd):$(pwd)" --workdir "$(pwd)" ghcr.io/roelandvanbatenburg/kube-prometheus-builder jb update
# Run the build script, this creates a manifests directory
docker run --rm -v "$(pwd):$(pwd)" --workdir "$(pwd)" ghcr.io/roelandvanbatenburg/kube-prometheus-builder ./build.sh config.jsonnet

Run it using:

chmod +x create_manifests.sh
./create_manifests.sh

Finally, follow the kube-prometheus instructions on applying the stack.

kubectl apply --server-side -f manifests/setup
kubectl wait \
 --for condition=Established \
 --all CustomResourceDefinition \
 --namespace=monitoring
kubectl apply -f manifests/

About

Docker image to help build kube-prometheus

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages