Skip to content

Latest commit

 

History

History
67 lines (48 loc) · 1.75 KB

README.md

File metadata and controls

67 lines (48 loc) · 1.75 KB

thanos-k8s-demo

Deploy Thanos on Kubernetes.

Overview

Getting started

  • Thanos Version: v0.24.0
  • Kubernetes Version: v1.16.9-aliyun.1
  • CloudProvider: Alicloud
git clone https://github.com/koktlzz/thanos-k8s-deployment.git
cd thanos-k8s-deployment
kubectl apply -k overlays/aliclound/

Validation

Deploy Prometheus in Observee Cluster

git clone https://github.com/coreos/kube-prometheus.git
cd kube-prometheus
kubectl create -f manifests/setup

# wait for namespaces and CRDs to become available, then
kubectl create -f manifests/

Enable Prometheus Remote Write

Use kubectl edit -n monitoring prometheus k8s to enable Prometheus remote write:

# local cluster
spec:
  remoteWrite:
    - url: http://thanos-receiver.thanos.svc.cluster.local:19291/api/v1/receive   
# cluster kazusa
spec:
  remoteWrite:
    - url: http://thanos-receiver.uuid.cn-shanghai.alicontainer.com/api/v1/receive
      headers:
        THANOS-TENANT: kazusa
# cluster setsuna
spec:
  remoteWrite:
    - url: http://thanos-receiver.uuid.cn-shanghai.alicontainer.com/api/v1/receive
      headers:
        THANOS-TENANT: setsuna

Then you can see three tenants in the Thanos Query UI(kubectl get ingress -n thanos | grep querier):

20220121161530

20220210134450

Reference

Thanos Remote Write

Achieve Multi-tenancy in Monitoring with Prometheus & Thanos Receiver

Adopting Thanos at Lastpass