HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
kubernetes
kube-state-metrics
Go2024–2024
kubernetes / kube-state-metrics

kube-state-metrics

Add-on agent to generate and expose cluster-level metrics.

2Distinct people
2Mentions
0Explicit recommenders
6.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Add-on agent to generate and expose cluster-level metrics.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week2 dated mentions

Observed mentions: 2024-07-29 15:54:39 UTC to 2024-11-27 04:03:44 UTC. Weeks start Monday, UTC.

012024-07-29 00:00:00 UTC to 2024-08-05 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJul 292024-08-05 00:00:00 UTC to 2024-08-12 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-08-12 00:00:00 UTC to 2024-08-19 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-08-19 00:00:00 UTC to 2024-08-26 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-08-26 00:00:00 UTC to 2024-09-02 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-09-02 00:00:00 UTC to 2024-09-09 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-09-09 00:00:00 UTC to 2024-09-16 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-09-16 00:00:00 UTC to 2024-09-23 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-09-23 00:00:00 UTC to 2024-09-30 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsSep 232024-09-30 00:00:00 UTC to 2024-10-07 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-10-07 00:00:00 UTC to 2024-10-14 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-10-14 00:00:00 UTC to 2024-10-21 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-10-21 00:00:00 UTC to 2024-10-28 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-10-28 00:00:00 UTC to 2024-11-04 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-11-04 00:00:00 UTC to 2024-11-11 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-11-11 00:00:00 UTC to 2024-11-18 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-11-18 00:00:00 UTC to 2024-11-25 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-11-25 00:00:00 UTC to 2024-12-02 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsNov 25

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jul 292024-07-29 00:00:00 UTC2024-08-05 00:00:00 UTC101
Aug 52024-08-05 00:00:00 UTC2024-08-12 00:00:00 UTC000
Aug 122024-08-12 00:00:00 UTC2024-08-19 00:00:00 UTC000
Aug 192024-08-19 00:00:00 UTC2024-08-26 00:00:00 UTC000
Aug 262024-08-26 00:00:00 UTC2024-09-02 00:00:00 UTC000
Sep 22024-09-02 00:00:00 UTC2024-09-09 00:00:00 UTC000
Sep 92024-09-09 00:00:00 UTC2024-09-16 00:00:00 UTC000
Sep 162024-09-16 00:00:00 UTC2024-09-23 00:00:00 UTC000
Sep 232024-09-23 00:00:00 UTC2024-09-30 00:00:00 UTC000
Sep 302024-09-30 00:00:00 UTC2024-10-07 00:00:00 UTC000
Oct 72024-10-07 00:00:00 UTC2024-10-14 00:00:00 UTC000
Oct 142024-10-14 00:00:00 UTC2024-10-21 00:00:00 UTC000
Oct 212024-10-21 00:00:00 UTC2024-10-28 00:00:00 UTC000
Oct 282024-10-28 00:00:00 UTC2024-11-04 00:00:00 UTC000
Nov 42024-11-04 00:00:00 UTC2024-11-11 00:00:00 UTC000
Nov 112024-11-11 00:00:00 UTC2024-11-18 00:00:00 UTC000
Nov 182024-11-18 00:00:00 UTC2024-11-25 00:00:00 UTC000
Nov 252024-11-25 00:00:00 UTC2024-12-02 00:00:00 UTC101

What Hacker News says

2 sources
> - Helm sucks, but so does Kustomize Helm != Kubernetes, FWIW I'd argue that Kustomize is the bee's knees but editor support for it sucks (or, I'd also accept that the docs suck, and/or are missing a bazillion examples so us mere mortals could enlighten ourselves to what all nouns and verbs are supported in the damn thing) > how many times your app OOMed in the last hour. heh, I'd love to hear those "shell scripts are all I need" folks chime in on how they'd get metrics for such a thing :-D (or Nomad, for that matter) That said, one of the other common themes in this discussion is how Kubernetes jams people up because there are a bazillion ways of doing anything, with wildly differing levels of "it just works" versus "someone's promo packet that was abandoned". Monitoring falls squarely in the bazillion-ways category, in that it for sure
Read the rest
does not come batteries included but there are a lot of cool toys if one has the cluster headroom to install them https://github.com/google/cadvisor/blob/v0.51.0/metrics/prom... which is allegedly exposed in kubelet since 2022 https://github.com/kubernetes/kubernetes/pull/108004 (I don't have a cluster in front of me to test it, though) https://github.com/kubernetes/kube-state-metrics/blob/v2.14.... shows the metric that KSM exposes in kube_pod_container_status_terminated_reason https://opentelemetry.io/docs/specs/semconv/attributes-regis... shows the OTel version of what I suspect is that same one And then in the "boil the ocean" version one could egress actual $(kubectl get events -w) payloads if using something where one is not charged by the metric: https://github.com/open-telemetry/opentelemetry-collector-co...
In Dear friend, you have built a Kubernetes
Nice article ;) > The number of rules may be large, which may be problematic for certain traffic forwarding implementations (iptables linearly evaluates every rule) Kube proxy also supports ipvs out of the box, and some CNI (like Cilium) can also replace kube proxy and rely on eBPF. > When a Pod is moved to another node, the traffic will be forwarded twice until the old DNS entry expires Not sure to understand this one. On a standard setup what happens is: - Pod A is running on a node, receiving traffic from a service - The pod is stopped by kubelet (that send a SIGTERM to it). - The pod should gracefully shutdown. During the shutdown phase, only _existing_ connections are forwarded to the stopping pod, new ones will be already forwarded elsewhere. - If the pod stops before the terminationGracePeriodSeconds duration (default 30s), everyth
Read the rest
ing is fine. Else, the pod is killed by kubelet. So it's developers that should make sure pods handle signals correctly. "Misbehaving clients (eg: ones that do not re-resolve DNS before reconnecting) will continue to work" => the services IP is stable so clients don't need to re-resolve. > Why does it not matter if the state is unstable? If I'm operating a cluster that can't settle, I'd like to know immediately! Kubernetes exposes a lot of metrics, on the control plane components or kubelet, usually using the Prometheus format. Look for example at the metrics exposed by kube state metrics: https://github.com/kubernetes/kube-state-metrics/tree/main/d... With controllers metrics + kube state metrics about most Kubernetes resources, you can easily build alerts when a resource fails to reconcile. > Basically, Horizontal Pod Autoscaler but with sensors which are not just "CPU" Take a look at KEDA, it's exactly this: https://keda.sh/ It "extends" the autoscaler capabilities. If you're running Prometheus you can for example scale on any metric that is stored in Prometheus (and so exposed by your application/infrastructure components: queue depth, latency, request rate...). Kubernetes was built to be extended like this. Same for your question "Why are the storage and networking implementations "out of tree" (CNI / CSI)?", to my experience support is very good today on various cloud providers or on premise infra components. Look at Karpenter for example, it's IMO a revolution in the Kubernetes node management world.
In A skeptic's first contact with Kubernetes

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.