{
  "id": 12336065,
  "title": "The 12 kubectl Queries We Run Before Every Cloud Cost Review",
  "url": "https://urgent.news/2026/10/06/the-12-kubectl-queries-we-run-before-every-cloud-cost-review",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-06T08:27:35.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/pits2022/the-12-kubectl-queries-we-run-before-every-cloud-cost-review-2g61"
  },
  "original_language": "en",
  "account": "Before conducting a cloud cost review for a Kubernetes cluster, it's essential to verify several key metrics using a series of 12 specific kubectl queries. These queries help identify potential inefficiencies and areas where costs could be reduced. Conducting these checks regularly is crucial because cluster usage and billing numbers can change over time, rather than relying on a single snapshot.\n\nFirst, the inventory of nodes is checked, listing their names, types, architectures, CPU capacities, and any taints. One notable finding is that the master node lacks an instance-type label, which affects the price mapping. The second query provides details on CPU and memory requests versus limits for each node, revealing significant disparities in usage. For example, one node has a CPU limit of 124% of its capacity, while another node shows 204% limit. Thirdly, the cluster's actual CPU and memory usage is assessed using `kubectl top nodes`, highlighting that only 4.7% of CPU is being used on average, with one node at just 14%.\n\nMoving on, the fourth query evaluates which pods are consuming the most memory, identifying a particular database pod using 4,290 MiB. The fifth query categorizes pods based on their Quality of Service (QoS) classes, with 77 pods marked as Burstable and 21 labeled as BestEffort. The sixth query compares the requested resources against the actual usage for each pod, revealing 2.7 GiB of idle memory across two database replicas.\n\nThe seventh query identifies pods that are using more resources than their requests, indicating potential inefficiencies. Eight pods exceed their allocated resources. Next, the ninth query examines volume capacities and usage, showing that 14 out of 16 volumes under 10 GB are underutilized, with many holding less than 1% of their capacity.\n\nThe tenth query looks for orphaned volumes that are not attached to any pod but still incur costs. No such volumes were found. The eleventh query checks for LoadBalancer and NodePort services that might be billed outside the cluster, identifying one LoadBalancer and one Service. Lastly, the twelfth query checks for any restarts or Out of Memory (OOM) kills, currently reporting no such issues.\n\nRunning these 12 queries before every review is vital because they provide a real-time snapshot of the cluster's resource consumption and billing structure. In May 2026, the cluster successfully reduced its CPU limits from 105% to a much more sustainable 77.7%, resulting in a 29% decrease in monthly compute costs from €114.95 to €81.95. However, just five months later, the CPU limits had increased to 124%, highlighting the need for ongoing monitoring and adjustment. These regular checks ensure that the cluster remains optimized and cost-effective as conditions change.",
  "summary": "Originally published on the Professional IT Services blog . Twelve queries show what a Kubernetes cluster costs and where it wastes money: nodes and taints, requests and limits, real usage, top pods, QoS classes, idle requests, pods over their requests, volumes, orphans, leftovers, load balancers and restarts. They need only kubectl , jq and the hcloud CLI, and the output below comes from our…",
  "key_points": [
    "12 specific kubectl queries essential for cloud cost review",
    "Master node lacks instance-type label affecting price mapping",
    "May 2026 review reduced CPU limits by 27.3% saving €33.95/month"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}