Questions tagged [kube-state-metrics]

50 questions
0
votes
0 answers

What kinds of pods are tracked in kube_node_status_condition metric?

Could I know what kinds of pods are tracked in kube_node_status_condition metric? Does it contains all control plane concomponents' pod? In my experiment, I can see kube-proxy pod and kube-dns pod and of course the pods I deployed. However, I am not…
bunny
  • 1,797
  • 8
  • 29
  • 58
0
votes
1 answer

kube-prometheus-stack upgrade failed with errors: "failed calling webhook x509: certificate signed by unknown authority" and "field is immutable"

I just upgraded kube-prometheus-stack using Helm chart on my Kubernetes cluster using Terraform and started seeing the following 2 errors: Error 1: failed calling webhook "prometheusrulemutate.monitoring.coreos.com": failed to call webhook: Post…
0
votes
2 answers

Kube State Deployment Replicas Metrics

I'm new to K8s and Kubernetes. Could someone please explain me the difference between the following kube state metrics... I've included the best descriptions I could find but I need some more context: kube_deployment_spec_replicas - Number of…
mickzer
  • 5,958
  • 5
  • 34
  • 57
0
votes
1 answer

Why KSM (Kube-State-Metrics) is being scraped by only one Prometheus shard?

We are deploying Prometheus with sharding capabilities using thanos sidecar. Prometheus has the below recording rule: sum by (cluster, namespace, pod, container) ( irate(container_cpu_usage_seconds_total{job="kubelet",…
0
votes
1 answer

Helm kube-prometheus-stack stuck in pending-install

Problem: For some reason, helm release of kube-prometheus-stack is stuck in Pending-install status. What is the correct to install a helm release for this using helm cli? Details: Due to Docker registry k8s.gcr.io getting frozen, I had to update the…
0
votes
1 answer

How to calculate costtime of a POD startup?

i want use kube-state-metrics to calculate costtime of a POD startup. sum(kube_pod_container_state_started{container="main"}) by (pod) - sum(kube_pod_created) by (pod) i can not confirm is it right?
0
votes
1 answer

kube-system (kube-controller and kube-flannels) pods are using too much resources

so I'm using eks amazon managed cluster for Kubernetes , I noticed some of the pods are using too much resources ,memory and cpu. pods are kube-controller and kube-flannels current version of Kubernetes is 1.22 (did upgrade from 1.21 bc of the…
0
votes
0 answers

Kubernetes monitoring

I have an kubernetes cluster running. I want to monitor this with kube-state-metrics. This is all installed and when port forwarding the metrics are visible on my local pc. I have prometheus running on a seperate ubuntu server. How do I expose the…
0
votes
1 answer

prometheus metrics join doesn't work as i expected

I have two prometheus metrics, kube_pod_info and kube_pod_container_status_restarts_total. And i need to enreach my telegram alert with data from both of them. kube_pod_container_status_restarts_total{project="abc",env = "prod",namespace!="test"}…
0
votes
2 answers

Using prometheus-community helm chart how can I expose custom pod labels

I've deployd default chart (helm install test prometheus-community/prometheus) to my minikube (Kubernetes version 1.21.5). I would like to have custom pod labels attached to kube_pod_status_ready metric which comes from kube-state-metric. E.g.: I…
sobi3ch
  • 2,555
  • 2
  • 31
  • 41
0
votes
1 answer

How can I get correct metric for pod status?

I'm trying to get the pod status in Grafana through Prometheus in a GKE cluster. kube-state-metrics has been installed together with Prometheus by using the prometheus-community/prometheus and grafana Helm charts. I tried to know the pod status…
0
votes
2 answers

Getting duplicate metrics when doing querying from the Prometheus Server

I am getting metrics exposed by kube-state-metrics by querying Prometheus-server but the issue is I am getting duplicate metrics with difference only in the job field. . I am doing query such as : curl…
0
votes
1 answer

Prometheus metrics are not matching with kubestate metrics in kubernetes dashboard

Metrics in Kubernetes Dashboard: kubectl top report: Metrics in Prometheus Grafana Dashboard: I installed Prometheus operator setup using helm chart prometheus-community/kube-prometheus-stack. Can anyone explain me why there a difference in the…
0
votes
1 answer

Scaling kube-state-metrics in prometheus-operator

In Prometheus-operator, I want to increase the kube-state-metrics replicas to 2. If I increase the replicas, and as the default service discovery role is endpoints, Prometheus will scrape each pod so I'll have all metrics scraped twice that will…
bazron
  • 176
  • 1
  • 9
0
votes
1 answer

how to configure an alert when a specific pod in k8s cluster goes into Failed state?

we are running spark on k8s cluster with help of spark-operator. for monitoring we are using prometheus. we want to configure an alert so that whenever any pod related to spark jobs transition to Failed state we should get an alert. and this alert…