kubectl --context cluster1 apply -f prometheus/setup
kubectl --context cluster1 apply -f prometheus/
kubectl --context cluster2 apply -f prometheus/setup
kubectl --context cluster2 apply -f prometheus/
vim thanos-objstore.yaml
type: S3
config:
bucket: "xxxx"
endpoint: "s3.amazonaws.com"
region: "us-east-1"
access_key: "yyyy"
secret_key: "zzzz"
cat thanos-objstore.yaml | base64
vim thanos-objstore-secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: thanos-objectstorage
namespace: monitoring
labels:
app: thanos
type: Opaque
data:
thanos.yaml: xxxxxxxxx==
kubectl --context cluster1 apply -f thanos-objstore-secret.yaml
kubectl --context cluster2 apply -f thanos-objstore-secret.yaml
kubectl --context=cluster1 -n monitoring apply -f 01-thanos-sidecar-svc.yaml
kubectl --context=cluster2 -n monitoring apply -f 01-thanos-sidecar-svc.yaml
kubectl --context cluster1 apply -f 02-thanos-querier.yaml