Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubectl top pod is doesn't work #2579

Open
XiaoChouYou opened this issue Dec 31, 2024 · 1 comment
Open

kubectl top pod is doesn't work #2579

XiaoChouYou opened this issue Dec 31, 2024 · 1 comment
Labels

Comments

@XiaoChouYou
Copy link

What happened?

[root@master kube-prometheus-0.14.0]# kubectl top pod
error: Metrics not available for pod default/php-apache-675bc649f5-tcb2w, age: 25h52m7.042307327s
[root@master kube-prometheus-0.14.0]#

Did you expect to see some different?
the Adapter it get node status is wrong

How to reproduce it (as minimally and precisely as possible):
i just install with cmdline :

kubectl apply --server-side -f kube-prometheus-0.14.0/manifests/setup/
kubectl apply --server-side -f kube-prometheus-0.14.0/manifests

Environment

  • Prometheus Operator version:

prometheus-operator/prometheus-operator:v0.76.2

  • Kubernetes version information:

k8s vesion is v1.28.2

  • Kubernetes cluster kind:

    insert how you created your cluster: kops, bootkube, tectonic-installer, etc.

  • Manifests:

insert manifests relevant to the issue
  • Prometheus Operator Logs:
Insert Prometheus Operator logs relevant to the issue here
  • Prometheus Logs:

{"httpRequest":{"clientIP":"10.244.1.198","method":"GET","path":"/api/v1/query"},"params":{"end":"2024-12-31T16:02:23.124Z","query":"sum by (pod,container) (\n irate (\n container_cpu_usage_seconds_total{namespace="default",pod="php-apache-675bc649f5-tcb2w",container!="",pod!=""}[120s]\n )\n)\n","start":"2024-12-31T16:02:23.124Z","step":0},"spanID":"0000000000000000","stats":{"timings":{"evalTotalTime":0.000056403,"resultSortTime":0,"queryPreparationTime":0.000027109,"innerEvalTime":0.000025544,"execQueueTime":0.000011317,"execTotalTime":0.000061844},"samples":{"totalQueryableSamples":0,"peakSamples":0}},"ts":"2024-12-31T16:02:23.127Z"}

Anything else we need to know?:

i think that container_cpu_usage_seconds_total not have the "container" metrics ,but prometheusAdapter-configMap.yaml config that cmd include "container"
and this is my prometheus demo data

container_cpu_usage_seconds_total{cpu="total", endpoint="https-metrics", id="/kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pod7d0c9045_7054_4491_9d28_3b3d488d7410.slice", instance="192.168.16.201:10250", job="kubelet", metrics_path="/metrics/cadvisor", namespace="default", node="node1", pod="php-apache-675bc649f5-tcb2w", service="kubelet"}

@XiaoChouYou
Copy link
Author

and i used the release pkg is 0.14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant