<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>K8s on Akshay Deshpande</title>
    <link>https://akshayd-dev.pages.dev/tags/k8s/</link>
    <description>Recent content in K8s on Akshay Deshpande</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 20 Nov 2025 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://akshayd-dev.pages.dev/tags/k8s/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Prometheus: Static/Dynamic scraping on EKS</title>
      <link>https://akshayd-dev.pages.dev/posts/prometheus-static-dynamic-scraping-on-eks/</link>
      <pubDate>Thu, 20 Nov 2025 00:00:00 +0000</pubDate>
      <guid>https://akshayd-dev.pages.dev/posts/prometheus-static-dynamic-scraping-on-eks/</guid>
      <description>&lt;p&gt;This note is a mental model for &lt;strong&gt;how Prometheus discovers and scrapes metrics in Kubernetes&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The lens I want to keep throughout is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Where will the scrape config file sit?&lt;/strong&gt;&lt;br&gt;
(Prometheus repo vs application repo)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;In which namespace will the serviceMonitor sit?&lt;/strong&gt;&lt;br&gt;
(and how Prometheus finds it)&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;At a high level there are two ways to tell Prometheus about a &lt;code&gt;/metrics&lt;/code&gt; endpoint:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Static via&lt;/strong&gt; in the Prometheus config file.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Dynamic via&lt;/strong&gt; (CRD from Prometheus Operator) with label‑based discovery.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
