<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gunjan Mirchandani on Medium]]></title>
        <description><![CDATA[Stories by Gunjan Mirchandani on Medium]]></description>
        <link>https://medium.com/@gunjanvmirchandani?source=rss-d1488aea4608------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*dzx2FschiGZGrhtv.jpg</url>
            <title>Stories by Gunjan Mirchandani on Medium</title>
            <link>https://medium.com/@gunjanvmirchandani?source=rss-d1488aea4608------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 21:55:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gunjanvmirchandani/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Designing Centralized Observability for Multi-Cluster Kubernetes]]></title>
            <link>https://medium.com/@gunjanvmirchandani/designing-centralized-observability-for-multi-cluster-kubernetes-12d75bf9c41a?source=rss-d1488aea4608------2</link>
            <guid isPermaLink="false">https://medium.com/p/12d75bf9c41a</guid>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[platform-engineering]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[prometheus]]></category>
            <dc:creator><![CDATA[Gunjan Mirchandani]]></dc:creator>
            <pubDate>Sat, 05 Sep 2026 03:51:50 GMT</pubDate>
            <atom:updated>2026-09-05T03:51:50.143Z</atom:updated>
            <content:encoded><![CDATA[<h3>How we reduced the observability footprint of workload clusters while keeping logs, metrics, and application-team alerting practical at scale</h3><p>Running an observability stack on Kubernetes is relatively straightforward when you have a handful of clusters.</p><p>Run Prometheus for metrics. Loki for logs. Grafana for visualization. Add Alertmanager for notifications, and perhaps Thanos when you need longer-term metrics storage.</p><p>Then the cluster count starts growing.</p><p>Suddenly, the architecture that gave every cluster independence also means operating the same infrastructure again and again:</p><p><strong>Prometheus. Loki. Grafana. Storage. Upgrades. Configuration. Troubleshooting. Repeat.</strong></p><p>That led us to a simple question:</p><p><strong>What is the minimum observability footprint a workload cluster actually needs?</strong></p><p>The answer pushed us toward a centralized observability architecture: keep telemetry collection close to workloads, but move long-term storage, cross-cluster querying, and visualization into a dedicated observability platform.</p><p>The architecture looked clean.</p><p>Until we got to alerting.</p><p>This article covers the architecture itself, the decisions behind it, and why preserving application-team self-service became one of the most important constraints in the design.</p><h3>Where We Started</h3><p>Our existing model was deliberately decentralized.</p><p>Each Kubernetes cluster effectively carried its own observability stack:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m2P-MRkHO8MBqdpSxffKxA.png" /></figure><p>Repeat that architecture across every cluster.</p><p>This model has some significant advantages.</p><p>Each cluster is operationally independent. Monitoring continues to function even when another cluster has issues. Application teams can also work with observability resources using the same Kubernetes and GitOps workflows they already understand.</p><p>Most importantly, teams have direct ownership of their alerting.</p><p>An application team can deploy resources such as:</p><pre>PrometheusRule<br>AlertmanagerConfig</pre><p>alongside its application.</p><p>A typical flow looks like:</p><pre>Application<br>     │<br>     ▼<br>Prometheus<br>     │<br>     │ PrometheusRule<br>     ▼<br>Alertmanager<br>     │<br>     │ AlertmanagerConfig<br>     ├──────────► Slack<br>     │<br>     └──────────► Enterprise monitoring / webhook</pre><p>This provides a very useful property:</p><p><strong>The platform team provides the observability capability, but application teams own their alerts and notification routing.</strong></p><p>We wanted to preserve that property.</p><h3>The Problem with Running Everything Everywhere</h3><p>As the platform grows, however, the operational cost of this model becomes increasingly visible.</p><p>Imagine operating dozens of Kubernetes clusters.</p><p>You potentially now operate:</p><pre>Dozens of Grafana deployments<br>Dozens of Loki deployments<br>Dozens of Prometheus deployments<br>Dozens of Thanos components<br>Dozens of storage configurations<br>Dozens of upgrade lifecycles</pre><p>The exact numbers depend on the topology, but the underlying problem remains.</p><p>Every new cluster increases the amount of observability infrastructure the platform team must deploy, upgrade, secure, monitor and troubleshoot.</p><p>There is also duplicated resource consumption.</p><p>Components such as Grafana and long-term storage systems do not necessarily need to exist independently in every workload cluster.</p><p>We therefore started asking a different question:</p><p><strong>What is the minimum observability footprint a workload cluster actually needs?</strong></p><p>That question changed the architecture considerably.</p><h3>Separate Collection from Storage</h3><p>One useful way to reason about observability is to separate two responsibilities.</p><h3>Collection</h3><p>Something must exist close to the workload to collect telemetry.</p><h3>Storage and analysis</h3><p>The collected telemetry does not necessarily need to remain in that cluster.</p><p>This leads naturally toward:</p><pre>Workload clusters<br>      │<br>      │ telemetry<br>      ▼<br>Central observability platform</pre><p>Instead of every cluster being responsible for collecting, storing, querying and visualizing its own telemetry, workload clusters can become primarily <strong>telemetry producers</strong>.</p><p>The expensive and operationally complex parts can be centralized.</p><h3>The Target Architecture</h3><p>Our target architecture has three major layers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hBCCcet4Bks47JB8TWDQxA.png" /></figure><p>There are two important decisions here.</p><p>First, the management cluster is <strong>not</strong> the observability cluster.</p><p>Second, workload clusters retain only the components that benefit from being close to the workload.</p><h3>Why Not Put Observability in the Management Cluster?</h3><p>When moving toward a centralized Kubernetes management platform, putting Grafana, Loki and Thanos into the management cluster can initially seem attractive.</p><p>After all, it is already the central cluster.</p><p>But their responsibilities are very different.</p><p>The management cluster exists to manage the lifecycle of workload clusters and platform infrastructure.</p><p>The observability platform has a different workload profile:</p><ul><li>high-volume log ingestion</li><li>metrics ingestion</li><li>object-storage interaction</li><li>expensive queries</li><li>dashboard workloads</li><li>potentially large memory requirements</li><li>unpredictable user queries</li></ul><p>Combining the two unnecessarily couples their failure domains.</p><p>A large Loki query should not compete with cluster-management controllers.</p><p>Similarly, an observability capacity issue should not affect the platform responsible for creating or repairing workload clusters.</p><p>We therefore treat the observability cluster as a dedicated platform service.</p><pre>Management Plane              Observability Plane<br>────────────────              ───────────────────<br>Cluster lifecycle             Metrics<br>Platform controllers          Logs<br>Cluster provisioning          Dashboards<br>Policy                        Long-term storage<br>                              Queries</pre><p>This separation also allows the two environments to scale independently.</p><h3>Centralizing Logs</h3><p>Logs were the more obvious candidate for centralization.</p><p>Each workload cluster runs a lightweight log collector.</p><p>In our case, that role is handled by Fluent Bit.</p><pre>Application Pods<br>      │<br>      │ stdout/stderr<br>      ▼<br>Fluent Bit<br>      │<br>      │ push<br>      ▼<br>Central Loki</pre><p>Fluent Bit is responsible for collecting container logs, enriching them with Kubernetes metadata, applying required processing and forwarding them to Loki.</p><p>Loki handles storage, indexing, querying and retention.</p><p>Grafana then queries the central Loki datasource.</p><p>The workload cluster no longer needs its own Loki deployment.</p><p>It also does not need its own Grafana instance simply to inspect logs.</p><h3>Centralizing Metrics</h3><p>Metrics require a slightly different approach.</p><p>We still want Prometheus close to workloads because Kubernetes service discovery and scraping naturally happen inside the cluster.</p><p>But we don’t necessarily need every child Prometheus to provide long-term metrics storage.</p><p>The resulting architecture is:</p><pre>Applications<br>     │<br>     │ scrape<br>     ▼<br>Prometheus<br>     │<br>     │ remote_write<br>     ▼<br>Central Thanos</pre><p>The child Prometheus can therefore be configured as a relatively lightweight instance with short local retention.</p><p>Its responsibilities are primarily:</p><pre>service discovery<br>scraping<br>local rule evaluation<br>remote_write</pre><p>while the centralized metrics platform provides:</p><pre>long-term storage<br>cross-cluster querying<br>historical analysis<br>Grafana datasource</pre><p>This gives us an important compromise.</p><p>We centralize the expensive storage and querying layer without removing Prometheus from the place where it works extremely well: close to Kubernetes workloads.</p><h3>Why Not Use Prometheus Agent Mode?</h3><p>Prometheus Agent mode is attractive for this type of architecture.</p><p>Conceptually:</p><pre>scrape<br>  │<br>  ▼<br>Prometheus Agent<br>  │<br>  │ remote_write<br>  ▼<br>Central metrics backend</pre><p>It removes functionality that is unnecessary when Prometheus is being used purely as a forwarding agent.</p><p>But there was an important problem for us.</p><p>Our application teams already own PrometheusRule resources.</p><p>They expect rules to be evaluated inside their cluster.</p><p>Agent mode does not perform local rule evaluation.</p><p>Moving completely to Agent mode would therefore force us to redesign our existing alerting ownership model.</p><p>Instead, we chose to retain a lightweight Prometheus server.</p><pre>┌───────────────────┐<br>                 │ Child Prometheus  │<br>                 │                   │<br>Scrape ─────────►│ local rules       │<br>                 │ short retention   │<br>                 │ remote_write      │<br>                 └───────┬───────────┘<br>                         │<br>                         ▼<br>                  Central Thanos</pre><p>This is slightly heavier than Agent mode.</p><p>But architecture is rarely about selecting the smallest possible component.</p><p>It is about selecting the right trade-off.</p><p>In our case, preserving application-team self-service was worth the additional footprint.</p><h3>The Resulting Metrics Architecture</h3><p>The metrics path therefore looks like this:</p><pre>CHILD CLUSTER</pre><pre>Application<br>     │<br>     ▼<br>ServiceMonitor / PodMonitor<br>     │<br>     ▼<br>Prometheus<br>     │<br>     ├──── PrometheusRule<br>     │<br>     ├──── Local Alertmanager<br>     │<br>     └──── remote_write<br>                    │<br>────────────────────┼────────────────────<br>                    │<br>                    ▼<br>            OBSERVABILITY CLUSTER</pre><pre>              Thanos Receive<br>                    │<br>                    ▼<br>               Thanos Query<br>                    │<br>                    ▼<br>                  Grafana</pre><p>This provides both <strong>local operational alerting</strong> and <strong>centralized historical/query capability</strong>.</p><h3>Labeling Becomes Part of the Architecture</h3><p>Once multiple clusters send telemetry into the same backend, labels become significantly more important.</p><p>A metric such as:</p><pre>http_requests_total</pre><p>is no longer sufficient context by itself.</p><p>The central system needs to distinguish dimensions such as:</p><pre>cluster<br>environment<br>namespace<br>team<br>service</pre><p>The same applies to logs.</p><p>A useful log stream might carry:</p><pre>cluster=&quot;prod-east-01&quot;<br>environment=&quot;production&quot;<br>namespace=&quot;payments&quot;<br>team=&quot;payments&quot;<br>app=&quot;checkout-api&quot;</pre><p>These labels are not merely useful for dashboards.</p><p>They become fundamental to:</p><ul><li>tenant isolation</li><li>querying</li><li>alert routing</li><li>ownership</li><li>troubleshooting</li><li>cost attribution</li></ul><p>One lesson from centralized observability is that <strong>telemetry metadata needs to be treated as a platform API</strong>.</p><p>If every cluster invents its own labels, centralization quickly becomes painful.</p><h3>What Stayed Local?</h3><p>Centralization does not mean everything moves centrally.</p><p>Our child clusters still contain:</p><pre>Fluent Bit<br>Prometheus<br>Alertmanager</pre><p>Application teams continue to own resources such as:</p><pre>PrometheusRule<br>AlertmanagerConfig</pre><p>The centralized observability cluster contains:</p><pre>Grafana<br>Loki<br>Thanos<br>long-term/object storage integrations</pre><p>The responsibility boundary is straightforward: <strong>collection, metric rule evaluation, and operational alerting remain in the workload clusters. Long-term storage, cross-cluster querying, log storage, and visualization move to the central observability platform.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O2sBfQIbdlp3jUQvQFU9Cw.png" /></figure><p>This isn’t a <strong>“centralize everything”</strong> architecture.</p><p>It is a <strong>“centralize where it provides leverage”</strong> architecture.</p><h3>The Architecture Looked Great — Until We Got to Log Alerts</h3><p>At this point, metrics worked nicely.</p><p>Application teams could continue doing:</p><pre>PrometheusRule<br>       │<br>       ▼<br>Prometheus<br>       │<br>       ▼<br>Alertmanager<br>       │<br>       ▼<br>AlertmanagerConfig<br>       │<br>       ├── Slack<br>       └── enterprise monitoring</pre><p>Their operational model barely changed.</p><p>Then we looked at logs.</p><p>Logs now followed:</p><pre>Application<br>     │<br>     ▼<br>Fluent Bit<br>     │<br>     ▼<br>Central Loki</pre><p>Suppose a team wants an alert like:</p><p>Alert me if payment failed appears more than ten times within five minutes.</p><p>The obvious solution is a LogQL alert.</p><p>But where should that rule execute?</p><p>The data is in central Loki.</p><p>So naturally:</p><pre>Central Loki<br>     │<br>     ▼<br>Loki Ruler</pre><p>And that’s where our otherwise clean architecture encountered an interesting problem.</p><p>Previously:</p><pre>Team<br>  │<br>  ▼<br>local rule<br>  │<br>  ▼<br>local Alertmanager<br>  │<br>  ▼<br>team-owned AlertmanagerConfig</pre><p>With centralized Loki:</p><pre>Team<br>  │<br>  ▼<br>central LogQL rule<br>  │<br>  ▼<br>central alert evaluation<br>  │<br>  ▼<br>???</pre><p>How do we preserve self-service?</p><p>Should teams create Grafana contact points?</p><p>Should notification routing move centrally?</p><p>Should we convert logs into metrics?</p><p>Should Loki send alerts to a central Alertmanager?</p><p>Could central alerts somehow reuse the team’s existing local AlertmanagerConfig?</p><p>And, critically, how do we solve this without giving application teams access to the platform-owned observability cluster?</p><p>It turned out that:</p><p><strong>Centralizing the data was the easy part. Preserving decentralized ownership was the harder architecture problem.</strong></p><p>That became the next phase of the design.</p><h3>Key Takeaways</h3><p>A few principles emerged from this exercise.</p><p><strong>Centralized observability doesn’t require centralized collection.</strong> Keep collectors close to workloads and centralize the expensive storage/query layers.</p><p><strong>Don’t overload the management cluster.</strong> Cluster lifecycle management and observability have different scaling characteristics and failure domains.</p><p><strong>Optimize child clusters for collection, not storage.</strong> Lightweight collectors and Prometheus instances can reduce the per-cluster observability footprint substantially.</p><p><strong>Architecture needs to account for organizational workflows.</strong> Prometheus Agent might be technically lighter, but retaining a lightweight Prometheus server preserved an existing and valuable application-team self-service model.</p><p><strong>Standardize telemetry labels early.</strong> cluster, namespace, environment, team and service become foundational once data from many clusters shares the same backend.</p><p>And perhaps the most important lesson:</p><p><strong>Centralizing telemetry is a technical problem. Centralizing it without taking ownership away from application teams is a platform-engineering problem.</strong></p><p>In the next article, I’ll walk through that alerting problem: the different approaches we evaluated for self-service LogQL alerting, why several seemingly obvious solutions didn’t fit our constraints, and the architecture we eventually chose.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12d75bf9c41a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>