mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
chore(grafana,prometheus): improve setup on kubernetes
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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'
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
@@ -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'
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Reference in New Issue
Block a user