{"id":82046,"date":"2026-09-07T11:31:31","date_gmt":"2026-09-07T06:01:31","guid":{"rendered":"https:\/\/www.tothenew.com\/blog\/?p=82046"},"modified":"2026-09-15T10:31:04","modified_gmt":"2026-09-15T05:01:04","slug":"building-a-local-ai-tool-for-kubernetes-cost-optimization","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/building-a-local-ai-tool-for-kubernetes-cost-optimization\/","title":{"rendered":"Building a Local AI Tool for Kubernetes Cost Optimization"},"content":{"rendered":"<p>Kubernetes has become the default platform for modern application delivery, but its cost story remains messy. Most teams use Kubecost to instrument cluster spend \u2014 and Kubecost does that job well \u2014 yet the moment you open the dashboard, you are staring at hundreds of rows of namespace, workload, and resource allocations with very little guidance on what actually matters.<\/p>\n<p>FinOps engineers end up doing the same exercise every month: reading the tables, eye-balling idle workloads, identifying over-provisioning, building a list of recommendations, and writing an executive summary. The work is repetitive, time-consuming, and the quality varies with the experience of the engineer doing it.<\/p>\n<p>What if a local AI model could do the analysis for you, in the customer&#8217;s own environment, without sending a single line of cluster data to an external provider? That question led to <strong>Steward<\/strong>.<\/p>\n<p>A completed Steward cost-analysis report against a test EKS cluster, showing the at-a-glance view, executive summary, and severity-graded findings.<\/p>\n<h2>The problem with manual cost reviews<\/h2>\n<p>A typical monthly review involves steps that don&#8217;t scale: reading 200-row allocation tables, identifying idle workloads and PVC waste by visual inspection, cross-referencing efficiency ratios against benchmarks, building a prioritised fix list by hand, and writing an executive summary. For a single cluster this takes half a day; across an MSP portfolio the effort compounds fast.<\/p>\n<p>SaaS tools like CAST AI, Spot.io, and Vantage automate cost analysis, but they require pushing cluster data \u2014 namespace names, workload identifiers, cost figures, sometimes auth tokens \u2014 into the vendor&#8217;s environment. For regulated industries (healthcare, finance, government), that is a hard stop. External LLM providers have the same problem: even anonymised data leaving the customer environment can derail an evaluation.<\/p>\n<h2>What we built<\/h2>\n<p>Steward is an open-source, local-first FinOps reporting tool for Kubernetes. It connects to a customer&#8217;s Kubecost installation, runs analysis with a locally hosted LLM, and produces executive-grade cost reports through a modern web UI.<\/p>\n<p>The key design constraint: <strong>no cluster cost data, namespace names, workload identifiers, or auth tokens ever leave the customer&#8217;s infrastructure<\/strong>. The LLM runs on a local Ollama daemon, the vector store on local ChromaDB, the database on local SQLite or Postgres. That&#8217;s the entire network surface.<\/p>\n<h2>System architecture<\/h2>\n<p>Six containerised services, all on the customer&#8217;s own Docker host:<\/p>\n<pre>  +---------------------+        +------------------+        +-----------------+\r\n  |  Next.js frontend   | -----&gt; |  FastAPI backend  | -----&gt; |  Kubecost API   |\r\n  |  (TS + shadcn\/ui)   |        |  (async)          |        |  (per env)      |\r\n  +---------------------+        +--------+----------+        +-----------------+\r\n                                          |\r\n                       +------------------+----------------+\r\n                       v                  v                v\r\n               +--------------+   +--------------+  +--------------+\r\n               |   SQLite\/PG  |   |    Ollama    |  |   ChromaDB   |\r\n               |  (history)   |   |   (LLM)      |  |   (RAG)      |\r\n               +--------------+   +--------------+  +--------------+<\/pre>\n<ul>\n<li><strong>Frontend<\/strong> \u2014 Next.js 15, TypeScript, Tailwind v4, shadcn\/ui.<\/li>\n<li><strong>Backend<\/strong> \u2014 FastAPI, Pydantic v2, SQLAlchemy 2.0 async.<\/li>\n<li><strong>Worker<\/strong> \u2014 arq job runner executing the scan pipeline.<\/li>\n<li><strong>Ollama<\/strong> \u2014 Local LLM daemon (default: qwen2.5:7b-instruct).<\/li>\n<li><strong>ChromaDB<\/strong> \u2014 Vector store seeded with FinOps reference material.<\/li>\n<li><strong>Redis<\/strong> \u2014 Job queue and cache.<\/li>\n<\/ul>\n<h2>How a scan works<\/h2>\n<p>When the user clicks <strong>Scan<\/strong>, the worker runs an eight-phase pipeline. Each phase commits to the database so the frontend&#8217;s polling sees live progress: mark RUNNING \u2192 concurrent Kubecost fetches (allocation, assets, savings) \u2192 build a structured digest with grounding fields \u2192 retrieve RAG context from ChromaDB \u2192 send system prompt + digest + RAG snippets to Ollama \u2192 post-LLM validation \u2192 enrich findings with dollar impacts \u2192 persist the report.<\/p>\n<h2>The clever bit: the grounded-LLM pattern<\/h2>\n<p>Anyone who has tried to use a 7B-parameter LLM for structured analysis has hit the same problem: the model hallucinates. It claims &#8220;no idle workloads&#8221; when the input has four. It calls a 15% efficiency score &#8220;healthy.&#8221; Steward solves this with the <strong>grounded-LLM pattern<\/strong> \u2014 a three-step contract between the preprocessor, the prompt, and a deterministic validator.<\/p>\n<p><strong>Step 1 \u2014 Grounding fields.<\/strong> The preprocessor computes a digest with bucketed thresholds the model must use verbatim:<\/p>\n<pre>{\r\n  \"cluster_scale\": \"trivial\",          \/\/ trivial | small | production\r\n  \"efficiency_grade\": \"critical\",      \/\/ healthy | mediocre | poor | critical\r\n  \"analysis_hints\": {\r\n    \"idle_workload_count\": 3,\r\n    \"over_provisioned_count\": 0,\r\n    \"efficiency_grade\": \"critical\",\r\n    \"cluster_scale\": \"trivial\"\r\n  },\r\n  \"cluster_efficiency\": { \"cpu\": 0.037, \"memory\": 0.825, \"overall\": 0.126 }\r\n}<\/pre>\n<p>&#8220;trivial&#8221; means &lt;$50\/mo run-rate. &#8220;critical&#8221; means 7\u00d7+ over-provisioning. These words become the vocabulary the LLM must use in its prose.<\/p>\n<p><strong>Step 2 \u2014 Grounded system prompt.<\/strong> The prompt enforces a strict contract: use exact grade and scale names from the digest, never describe a critical-grade cluster as &#8220;healthy,&#8221; and forbid AI filler phrases like &#8220;leverage&#8221; or &#8220;synergy.&#8221; Each finding must include a digest_reference pointer so the worker can resolve concrete dollar impacts.<\/p>\n<p><strong>Step 3 \u2014 Deterministic validator.<\/strong> After the LLM returns, a Python validator checks for negation contradictions, healthy-downplay phrases, boilerplate recommendations, severity violations on trivial clusters, and missing dollar impacts. Violations trigger a single repair round. If the model still fails, violations are logged but the report persists \u2014 a flawed report with a warning beats no report.<\/p>\n<h2>What the output looks like<\/h2>\n<p>Every report opens with cards summarising cluster scale, per-resource efficiency (CPU \/ memory \/ overall with grade-driven colouring), and signal counts. A stacked bar shows the namespace cost breakdown \u2014 the &#8220;read the room in five seconds&#8221; view.<\/p>\n<p>Below that, the LLM-written executive summary uses the digest&#8217;s exact grade names. Findings are sorted by severity then dollar impact, each with a severity-coloured border, a specific workload identifier, a concrete recommendation, and the dollar impact attached.<\/p>\n<p>The Cost Analysis report with efficiency grade, signal counts, and severity-graded findings naming specific deployments. Multi-environment dashboard with at-a-glance status and aggregated metrics. Reports page showing cost trend over time and sortable scan history.<\/p>\n<h2>Manual workflow vs. Steward<\/h2>\n<table>\n<thead>\n<tr>\n<th><strong>Without Steward<\/strong><\/th>\n<th><strong>With Steward<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Half a day per cluster review<\/td>\n<td>~2 minutes per scan<\/td>\n<\/tr>\n<tr>\n<td>Quality varies by engineer experience<\/td>\n<td>Consistent executive reports<\/td>\n<\/tr>\n<tr>\n<td>Manual waste identification<\/td>\n<td>Automatic idle \/ over-provisioned \/ PVC detection<\/td>\n<\/tr>\n<tr>\n<td>Generic recommendations<\/td>\n<td>Specific workload names and CPU\/memory targets<\/td>\n<\/tr>\n<tr>\n<td>Cluster data exposed to SaaS vendors<\/td>\n<td>All data stays on customer infrastructure<\/td>\n<\/tr>\n<tr>\n<td>Compliance objections in regulated industries<\/td>\n<td>Compatible by default for healthcare\/finance\/gov<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Getting started<\/h2>\n<p>Steward runs entirely from Docker Compose:<\/p>\n<pre>git clone https:\/\/github.com\/Deepanshu846\/Steward_Scanner.git\r\ncd Steward\r\ncp .env.example .env\r\n\r\n# Generate a SECRET_KEY:\r\npython3 -c \"from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())\"\r\n# Paste output into .env as SECRET_KEY=...\r\n\r\ndocker compose up -d\r\ndocker compose exec ollama ollama pull qwen2.5:7b-instruct<\/pre>\n<p>Then open http:\/\/localhost:3000, add a Kubecost environment, and click Scan. You&#8217;ll need Docker with Compose v2, 8 GB RAM allocated to Docker, ~10 GB free disk, and a reachable Kubecost installation on an AWS EKS cluster (any v2.x).<\/p>\n<h2>Conclusion<\/h2>\n<p>Kubernetes cost optimisation does not have to mean reading endless allocation tables, and AI-driven FinOps does not have to mean shipping cluster data to a third party. By combining a structured digest, a grounded system prompt, a deterministic validator, and a locally hosted LLM, Steward demonstrates that small open-source models can produce reliable, executive-grade FinOps reports \u2014 entirely on customer infrastructure.<\/p>\n<p>For MSPs and platform teams, this approach standardises a typically artisanal process and opens conversations with regulated-industry clients who previously could not adopt SaaS FinOps tools. The full source is on <a href=\"https:\/\/github.com\/Deepanshu846\/Steward_Scanner\">GitHub<\/a>.<\/p>\n<h2>Want to take Kubernetes cost optimisation to the next level?<\/h2>\n<p><strong>Don&#8217;t just read about local AI for FinOps \u2014 experience it.<\/strong> Explore how TO THE NEW helps teams optimise and modernise their cloud at <a href=\"https:\/\/www.tothenew.com\/\">tothenew.com<\/a>, or <a href=\"https:\/\/www.tothenew.com\/contact-us\">schedule a call with us today<\/a>.<\/p>\n<p><strong>Want the technical details?<\/strong> The project is open-source on <a href=\"https:\/\/github.com\/Deepanshu846\/Steward_Scanner\">GitHub<\/a>. Follow us for more engineering write-ups, and if you have questions or ideas, leave a comment \u2014 I&#8217;d love to hear how you handle Kubernetes FinOps on your team.<\/p>\n<p><!-- SUGGESTED TAGS (add in the WordPress Tags field): Kubernetes, Kubecost, FinOps, Cost Optimization, Local AI, LLM, Ollama, Cloud, AWS EKS, DevOps, Open Source, Privacy, Regulated Industries, Platform Engineering --><br \/>\n<!-- SUGGESTED TAGS: Kubernetes, Kubecost, FinOps, Cost Optimization, Local AI, LLM, Ollama, Cloud, AWS EKS, DevOps, Open Source, Privacy, Regulated Industries, Platform Engineering --><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Kubernetes has become the default platform for modern application delivery, but its cost story remains messy. Most teams use Kubecost to instrument cluster spend \u2014 and Kubecost does that job well \u2014 yet the moment you open the dashboard, you are staring at hundreds of rows of namespace, workload, and resource allocations with very little [&hellip;]<\/p>\n","protected":false},"author":2129,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":3,"footnotes":""},"categories":[5877],"tags":[6618],"class_list":["post-82046","post","type-post","status-publish","format-standard","hentry","category-msp","tag-cloudsecurity"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Kubernetes has become the default platform for modern application delivery, but its cost story remains messy. Most teams use Kubecost to instrument cluster spend \u2014 and Kubecost does that job well \u2014 yet the moment you open the dashboard, you are staring at hundreds of rows of namespace, workload, and resource allocations with very little\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Deepanshu Sharma\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.tothenew.com\/blog\/building-a-local-ai-tool-for-kubernetes-cost-optimization\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Building a Local AI Tool for Kubernetes Cost Optimization | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"Kubernetes has become the default platform for modern application delivery, but its cost story remains messy. Most teams use Kubecost to instrument cluster spend \u2014 and Kubecost does that job well \u2014 yet the moment you open the dashboard, you are staring at hundreds of rows of namespace, workload, and resource allocations with very little\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.tothenew.com\/blog\/building-a-local-ai-tool-for-kubernetes-cost-optimization\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Building a Local AI Tool for Kubernetes Cost Optimization | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Kubernetes has become the default platform for modern application delivery, but its cost story remains messy. Most teams use Kubecost to instrument cluster spend \u2014 and Kubecost does that job well \u2014 yet the moment you open the dashboard, you are staring at hundreds of rows of namespace, workload, and resource allocations with very little\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/building-a-local-ai-tool-for-kubernetes-cost-optimization\\\/#article\",\"name\":\"Building a Local AI Tool for Kubernetes Cost Optimization | TO THE NEW Blog\",\"headline\":\"Building a Local AI Tool for Kubernetes Cost Optimization\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/deepanshu-sharma\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2026-09-07T11:31:31+05:30\",\"dateModified\":\"2026-09-15T10:31:04+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/building-a-local-ai-tool-for-kubernetes-cost-optimization\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/building-a-local-ai-tool-for-kubernetes-cost-optimization\\\/#webpage\"},\"articleSection\":\"MSP, CloudSecurity\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/building-a-local-ai-tool-for-kubernetes-cost-optimization\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/msp\\\/#listItem\",\"name\":\"MSP\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/msp\\\/#listItem\",\"position\":2,\"name\":\"MSP\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/msp\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/building-a-local-ai-tool-for-kubernetes-cost-optimization\\\/#listItem\",\"name\":\"Building a Local AI Tool for Kubernetes Cost Optimization\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/building-a-local-ai-tool-for-kubernetes-cost-optimization\\\/#listItem\",\"position\":3,\"name\":\"Building a Local AI Tool for Kubernetes Cost Optimization\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/msp\\\/#listItem\",\"name\":\"MSP\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/deepanshu-sharma\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/deepanshu-sharma\\\/\",\"name\":\"Deepanshu Sharma\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/building-a-local-ai-tool-for-kubernetes-cost-optimization\\\/#authorImage\",\"url\":\"https:\\\/\\\/newersworld-sf-static.tothenew.net\\\/prod\\\/profilePicFolder\\\/fbf9cde5-e0c0-4699-9019-eeddb45d518c_5562-Deepanshu-Sharma-PROFILEPICTURE.jpeg\",\"width\":96,\"height\":96,\"caption\":\"Deepanshu Sharma\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/building-a-local-ai-tool-for-kubernetes-cost-optimization\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/building-a-local-ai-tool-for-kubernetes-cost-optimization\\\/\",\"name\":\"Building a Local AI Tool for Kubernetes Cost Optimization | TO THE NEW Blog\",\"description\":\"Kubernetes has become the default platform for modern application delivery, but its cost story remains messy. Most teams use Kubecost to instrument cluster spend \\u2014 and Kubecost does that job well \\u2014 yet the moment you open the dashboard, you are staring at hundreds of rows of namespace, workload, and resource allocations with very little\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/building-a-local-ai-tool-for-kubernetes-cost-optimization\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/deepanshu-sharma\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/deepanshu-sharma\\\/#author\"},\"datePublished\":\"2026-09-07T11:31:31+05:30\",\"dateModified\":\"2026-09-15T10:31:04+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Building a Local AI Tool for Kubernetes Cost Optimization | TO THE NEW Blog","description":"Kubernetes has become the default platform for modern application delivery, but its cost story remains messy. Most teams use Kubecost to instrument cluster spend \u2014 and Kubecost does that job well \u2014 yet the moment you open the dashboard, you are staring at hundreds of rows of namespace, workload, and resource allocations with very little","canonical_url":"https:\/\/www.tothenew.com\/blog\/building-a-local-ai-tool-for-kubernetes-cost-optimization\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.tothenew.com\/blog\/building-a-local-ai-tool-for-kubernetes-cost-optimization\/#article","name":"Building a Local AI Tool for Kubernetes Cost Optimization | TO THE NEW Blog","headline":"Building a Local AI Tool for Kubernetes Cost Optimization","author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/deepanshu-sharma\/#author"},"publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"},"datePublished":"2026-09-07T11:31:31+05:30","dateModified":"2026-09-15T10:31:04+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.tothenew.com\/blog\/building-a-local-ai-tool-for-kubernetes-cost-optimization\/#webpage"},"isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/building-a-local-ai-tool-for-kubernetes-cost-optimization\/#webpage"},"articleSection":"MSP, CloudSecurity"},{"@type":"BreadcrumbList","@id":"https:\/\/www.tothenew.com\/blog\/building-a-local-ai-tool-for-kubernetes-cost-optimization\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.tothenew.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/msp\/#listItem","name":"MSP"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/msp\/#listItem","position":2,"name":"MSP","item":"https:\/\/www.tothenew.com\/blog\/category\/msp\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/building-a-local-ai-tool-for-kubernetes-cost-optimization\/#listItem","name":"Building a Local AI Tool for Kubernetes Cost Optimization"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/building-a-local-ai-tool-for-kubernetes-cost-optimization\/#listItem","position":3,"name":"Building a Local AI Tool for Kubernetes Cost Optimization","previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/msp\/#listItem","name":"MSP"}}]},{"@type":"Organization","@id":"https:\/\/www.tothenew.com\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/www.tothenew.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.tothenew.com\/blog\/author\/deepanshu-sharma\/#author","url":"https:\/\/www.tothenew.com\/blog\/author\/deepanshu-sharma\/","name":"Deepanshu Sharma","image":{"@type":"ImageObject","@id":"https:\/\/www.tothenew.com\/blog\/building-a-local-ai-tool-for-kubernetes-cost-optimization\/#authorImage","url":"https:\/\/newersworld-sf-static.tothenew.net\/prod\/profilePicFolder\/fbf9cde5-e0c0-4699-9019-eeddb45d518c_5562-Deepanshu-Sharma-PROFILEPICTURE.jpeg","width":96,"height":96,"caption":"Deepanshu Sharma"}},{"@type":"WebPage","@id":"https:\/\/www.tothenew.com\/blog\/building-a-local-ai-tool-for-kubernetes-cost-optimization\/#webpage","url":"https:\/\/www.tothenew.com\/blog\/building-a-local-ai-tool-for-kubernetes-cost-optimization\/","name":"Building a Local AI Tool for Kubernetes Cost Optimization | TO THE NEW Blog","description":"Kubernetes has become the default platform for modern application delivery, but its cost story remains messy. Most teams use Kubecost to instrument cluster spend \u2014 and Kubecost does that job well \u2014 yet the moment you open the dashboard, you are staring at hundreds of rows of namespace, workload, and resource allocations with very little","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.tothenew.com\/blog\/building-a-local-ai-tool-for-kubernetes-cost-optimization\/#breadcrumblist"},"author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/deepanshu-sharma\/#author"},"creator":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/deepanshu-sharma\/#author"},"datePublished":"2026-09-07T11:31:31+05:30","dateModified":"2026-09-15T10:31:04+05:30"},{"@type":"WebSite","@id":"https:\/\/www.tothenew.com\/blog\/#website","url":"https:\/\/www.tothenew.com\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Building a Local AI Tool for Kubernetes Cost Optimization | TO THE NEW Blog","og:description":"Kubernetes has become the default platform for modern application delivery, but its cost story remains messy. Most teams use Kubecost to instrument cluster spend \u2014 and Kubecost does that job well \u2014 yet the moment you open the dashboard, you are staring at hundreds of rows of namespace, workload, and resource allocations with very little","og:url":"https:\/\/www.tothenew.com\/blog\/building-a-local-ai-tool-for-kubernetes-cost-optimization\/","og:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Building a Local AI Tool for Kubernetes Cost Optimization | TO THE NEW Blog","twitter:description":"Kubernetes has become the default platform for modern application delivery, but its cost story remains messy. Most teams use Kubecost to instrument cluster spend \u2014 and Kubecost does that job well \u2014 yet the moment you open the dashboard, you are staring at hundreds of rows of namespace, workload, and resource allocations with very little","twitter:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"82046","title":null,"description":null,"keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"limit_modified_date":false,"created":"2026-09-07 06:00:09","updated":"2026-09-15 05:01:06","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":{"faqs":[],"keyPoints":[],"schemas":[],"titles":[],"descriptions":[],"socialPosts":{"email":{"subject":"","preview":"","content":""},"linkedin":[],"twitter":[],"facebook":[],"instagram":[]}},"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\/category\/msp\/\" title=\"MSP\">MSP<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tBuilding a Local AI Tool for Kubernetes Cost Optimization\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.tothenew.com\/blog"},{"label":"MSP","link":"https:\/\/www.tothenew.com\/blog\/category\/msp\/"},{"label":"Building a Local AI Tool for Kubernetes Cost Optimization","link":"https:\/\/www.tothenew.com\/blog\/building-a-local-ai-tool-for-kubernetes-cost-optimization\/"}],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/82046","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/2129"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=82046"}],"version-history":[{"count":2,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/82046\/revisions"}],"predecessor-version":[{"id":83009,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/82046\/revisions\/83009"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=82046"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=82046"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=82046"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}