diff --git a/knowledge base/grafana.md b/knowledge base/grafana.md index 3d6b7b6..4ff9157 100644 --- a/knowledge base/grafana.md +++ b/knowledge base/grafana.md @@ -56,7 +56,7 @@ Access components: kubectl -n 'monitoring' get secret 'grafana' -o jsonpath='{.data.admin-password}' | base64 --decode kubectl -n 'monitoring' get pods -l 'app.kubernetes.io/name=grafana,app.kubernetes.io/instance=grafana' \ -o jsonpath='{.items[0].metadata.name}' \ -| xargs -I {} kubectl -n 'monitoring' port-forward {} 3000 +| xargs -I '%%' kubectl -n 'monitoring' port-forward "%%" '3000' ``` Clean up: diff --git a/knowledge base/mimir.md b/knowledge base/mimir.md index dc36812..d64be82 100644 --- a/knowledge base/mimir.md +++ b/knowledge base/mimir.md @@ -56,14 +56,14 @@ As a workaround, upload Thanos' blocks directly to Mimir's blocks bucket, using ```sh docker pull 'grafana/mimir' +helm repo add 'grafana' 'https://grafana.github.io/helm-charts' && helm repo update 'grafana' -mimir -docker run --rm --name 'mimir' --publish '8080:8080' --publish '9095:9095' 'grafana/mimir' - +# Does *not* look for default configuration files. +# When no configuration file is given, only default values are used. This is not something one might usually want. mimir --config.file='./demo.yaml' -docker run --rm --name 'mimir' --publish '8080:8080' --publish '9095:9095' \ - --volume "$PWD/config.yaml:/etc/mimir/config.yaml" \ - 'grafana/mimir' --config.file='/etc/mimir/config.yaml' +docker run --rm --name 'mimir' -p '8080:8080' -p '9095:9095' -v "$PWD/config.yaml:/etc/mimir/config.yaml" \ + 'grafana/mimir' -- --config.file='/etc/mimir/config.yaml' +helm --namespace 'mimir-test' upgrade --install --create-namespace 'mimir' 'grafana/mimir-distributed' ``` diff --git a/knowledge base/prometheus/README.md b/knowledge base/prometheus/README.md index b97f08a..b36f4ee 100644 --- a/knowledge base/prometheus/README.md +++ b/knowledge base/prometheus/README.md @@ -50,6 +50,14 @@ them in an HTTP endpoint in their place. docker pull 'prom/prometheus' docker run -p '9090:9090' -v "$PWD/config/dir:/etc/prometheus" -v 'prometheus-data:/prometheus' 'prom/prometheus' +helm repo add 'prometheus-community' 'https://prometheus-community.github.io/helm-charts' \ +&& helm repo update 'prometheus-community' +helm show values 'prometheus-community/prometheus' +helm -n 'prometheus' upgrade -i --create-namespace 'prometheus' 'prometheus-community/prometheus' +kubectl -n 'prometheus' get pods -l 'app.kubernetes.io/name=prometheus,app.kubernetes.io/instance=prometheus' \ + -o jsonpath='{.items[0].metadata.name}' \ +| xargs -I '%%' kubectl -n 'prometheus' port-forward "%%" '9090' +helm --namespace 'prometheus' uninstall 'prometheus' ```