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 pods command is giving error "error: Metrics not available for pod". even kubectl top nodes is working #1558

Open
omduttpathak opened this issue Sep 4, 2024 · 2 comments
Assignees
Labels
triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@omduttpathak
Copy link

I am using kubernetes version
Client Version: v1.22.0
Server Version: v1.24.1

I have installed metrics server by using below command and URL.

kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.7.2/components.yaml

I can get the output successfully using "kubectl top nodes:" command. but Unable to get the metrics on "kubectl top pods" command. getting below error.

error: Metrics not available for pod kube-system/cadvisor-6rp4r, age: 2709h18m37.384021169s

I tried with other namespace also but same error "error: Metrics not available for pod xxx"

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Sep 4, 2024
@dashpole
Copy link

dashpole commented Sep 5, 2024

/assign @yangjunmyfm192085
/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Sep 5, 2024
@yangjunmyfm192085
Copy link
Contributor

Hi, @omduttpathak You can refer to the following known issues to see if they can help you.
https://github.com/kubernetes-sigs/metrics-server/blob/master/KNOWN_ISSUES.md#kubelet-doesnt-report-pod-metrics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

4 participants