Is a Service Mesh Necessary for Thanos to Scrape Metrics from Kubernetes Clusters?

0
6
Asked By TechyNomad42 On

I'm setting up an internal load balancer (with external-dns as a nice bonus) for several Kubernetes clusters so that my central Thanos can scrape metrics from them. I want to stick to Kubernetes-native solutions and avoid relying on cloud infrastructure. Do you think implementing a service mesh would be excessive for this purpose?

4 Answers

Answered By ClusterKing55 On

We actually do this setup! Our clusters are fully independent but connected through Thanos using Istio. The great thing is if Istio ever goes down, the system still operates independently without data loss. Honestly, this approach has its advantages over remote-write because it allows for temporary outages in Istio without raising alarms. Just make sure you design it properly since Istio can be tricky and may fail if not handled carefully.

K8sEnthusiast77 -

I haven’t faced any major issues with Istio going down. There was one incident when the istiod pod went down due to user error, but the gateways continued to function without a hitch.

Answered By CloudyDreamer88 On

In my opinion, a service mesh might be overkill here. I recommend using the Thanos sidecar for each Prometheus instance instead. You’ll just need to ensure that you can query metrics from the leaf nodes for the last couple of hours.

Answered By NetworkNinja34 On

Another option to consider is using Tailscale instead of a full service mesh.

Answered By MetricWizard19 On

Have you considered whether Thanos supports Prometheus remote write? Instead of having Thanos retrieve metrics from your clusters, the clusters could push their metrics to Thanos directly. Just bear in mind, you might need to set up a lightweight collector like Grafana Alloy in each cluster for this.

DataGuru99 -

That's right! You would use the Thanos-receive component as a target for remote writes. However, keep in mind that it can be quite memory-intensive.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.