2.1 Tasks: Thanos Querier

To have centralized access to the metrics of both the shared infrastructure Prometheus instance as well as your own userwokload Prometheus instance, we will install the Thanos Querier in this lab. This will give us a central point of view for the following prometheus instances:

  • Infrastructure Prometheus (K8S Metrics, Node Metrics, …) in the global monitoring namespace
  • Userworkload Prometheus (the stack we can use for our application metrics) in the <user>-monitoring namespace

Task 2.1.1: Install Thanos Querier

To install the Thanos Querier, change query.enabled to true in the values.yaml of your user-monitoring Helm release. ArgoCD will automagically install all needed components in your namespace.

charts/user-monitoring/values.yaml:

user: <user> # Replace me
# prometheus
prometheus:
  enabled: true
# thanos-query
query:
  enabled: true
# grafana
grafana:
  enabled: false
# blackboxexporter
blackboxexporter:
  enabled: false
# pushgateway
pushgateway:
  enabled: false
# alertmanager
alertmanager:
  enabled: false
# thanos-ruler
ruler:
  enabled: false

Commit and push the changes to your git repository and let ArgoCD synchronize the changes.

Task 2.1.1: Verify the installation

Make sure that the Thanos Querier is running and ready.

Hints
kubectl -n $USER-monitoring get pods -l app.kubernetes.io/name=thanos-query

Have a look at the Thanos Query deployment in detail to see the relevant configuration parameters.

Hints
kubectl -n $USER-monitoring get deploy -l app.kubernetes.io/name=thanos-query -o yaml

Open the web UI to check whether the querier is up and running and accessible.