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 node logs error: metrics not available yet #1629

Open
yangbin1212 opened this issue Feb 25, 2025 · 2 comments
Open

kubectl top node logs error: metrics not available yet #1629

yangbin1212 opened this issue Feb 25, 2025 · 2 comments
Labels
kind/support Categorizes issue or PR as a support question. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@yangbin1212
Copy link

k8s version: v1.20.7
os version: Ubuntu 22.04.4 LTS
cgroup version: cgroup2fs
metrics-server version: 0.5.0

I had deploy metrics-server version: 0.5.0 on my k8s,when i use the commod kubectl top node,log error: metrics not available yet.

root@kube-master-01:~# kubectl top node -v 8
I0225 20:26:20.942796 2741208 loader.go:379] Config loaded from file: /root/.kube/config
I0225 20:26:20.943790 2741208 round_trippers.go:422] GET https://192.168.15.120:6443/api?timeout=32s
I0225 20:26:20.943802 2741208 round_trippers.go:429] Request Headers:
I0225 20:26:20.943809 2741208 round_trippers.go:433] Accept: application/json, /
I0225 20:26:20.943814 2741208 round_trippers.go:433] User-Agent: kubectl/v1.20.7 (linux/amd64) kubernetes/132a687
I0225 20:26:20.950776 2741208 round_trippers.go:448] Response Status: 200 OK in 6 milliseconds
I0225 20:26:20.950794 2741208 round_trippers.go:451] Response Headers:
I0225 20:26:20.950801 2741208 round_trippers.go:454] Date: Tue, 25 Feb 2025 12:26:20 GMT
I0225 20:26:20.950807 2741208 round_trippers.go:454] Cache-Control: no-cache, private
I0225 20:26:20.950812 2741208 round_trippers.go:454] Content-Type: application/json
I0225 20:26:20.950816 2741208 round_trippers.go:454] X-Kubernetes-Pf-Flowschema-Uid: 1946d0c6-bb00-4321-ac18-d9d836618e5f
I0225 20:26:20.950821 2741208 round_trippers.go:454] X-Kubernetes-Pf-Prioritylevel-Uid: a0307626-29d0-44b2-a06b-d98bcdd02cb2
I0225 20:26:20.950826 2741208 round_trippers.go:454] Content-Length: 137
I0225 20:26:20.950847 2741208 request.go:1107] Response Body: {"kind":"APIVersions","versions":["v1"],"serverAddressByClientCIDRs":[{"clientCIDR":"0.0.0.0/0","serverAddress":"192.168.15.120:6443"}]}
I0225 20:26:20.951099 2741208 round_trippers.go:422] GET https://192.168.15.120:6443/apis?timeout=32s
I0225 20:26:20.951107 2741208 round_trippers.go:429] Request Headers:
I0225 20:26:20.951115 2741208 round_trippers.go:433] Accept: application/json, /
I0225 20:26:20.951120 2741208 round_trippers.go:433] User-Agent: kubectl/v1.20.7 (linux/amd64) kubernetes/132a687
I0225 20:26:20.951743 2741208 round_trippers.go:448] Response Status: 200 OK in 0 milliseconds
I0225 20:26:20.951763 2741208 round_trippers.go:451] Response Headers:
I0225 20:26:20.951772 2741208 round_trippers.go:454] Date: Tue, 25 Feb 2025 12:26:20 GMT
I0225 20:26:20.951780 2741208 round_trippers.go:454] Cache-Control: no-cache, private
I0225 20:26:20.951787 2741208 round_trippers.go:454] Content-Type: application/json
I0225 20:26:20.951791 2741208 round_trippers.go:454] X-Kubernetes-Pf-Flowschema-Uid: 1946d0c6-bb00-4321-ac18-d9d836618e5f
I0225 20:26:20.951806 2741208 round_trippers.go:454] X-Kubernetes-Pf-Prioritylevel-Uid: a0307626-29d0-44b2-a06b-d98bcdd02cb2
I0225 20:26:20.951945 2741208 request.go:1107] Response Body: {"kind":"APIGroupList","apiVersion":"v1","groups":[{"name":"apiregistration.k8s.io","versions":[{"groupVersion":"apiregistration.k8s.io/v1","version":"v1"},{"groupVersion":"apiregistration.k8s.io/v1beta1","version":"v1beta1"}],"preferredVersion":{"groupVersion":"apiregistration.k8s.io/v1","version":"v1"}},{"name":"apps","versions":[{"groupVersion":"apps/v1","version":"v1"}],"preferredVersion":{"groupVersion":"apps/v1","version":"v1"}},{"name":"events.k8s.io","versions":[{"groupVersion":"events.k8s.io/v1","version":"v1"},{"groupVersion":"events.k8s.io/v1beta1","version":"v1beta1"}],"preferredVersion":{"groupVersion":"events.k8s.io/v1","version":"v1"}},{"name":"authentication.k8s.io","versions":[{"groupVersion":"authentication.k8s.io/v1","version":"v1"},{"groupVersion":"authentication.k8s.io/v1beta1","version":"v1beta1"}],"preferredVersion":{"groupVersion":"authentication.k8s.io/v1","version":"v1"}},{"name":"authorization.k8s.io","versions":[{"groupVersion":"authorization.k8s.io/v1","version":"v1"},{"groupVersi [truncated 4600 chars]
I0225 20:26:20.952386 2741208 round_trippers.go:422] GET https://192.168.15.120:6443/apis/metrics.k8s.io/v1beta1/nodes
I0225 20:26:20.952408 2741208 round_trippers.go:429] Request Headers:
I0225 20:26:20.952418 2741208 round_trippers.go:433] Accept: application/json, /
I0225 20:26:20.952428 2741208 round_trippers.go:433] User-Agent: kubectl/v1.20.7 (linux/amd64) kubernetes/132a687
I0225 20:26:20.954709 2741208 round_trippers.go:448] Response Status: 200 OK in 2 milliseconds
I0225 20:26:20.954720 2741208 round_trippers.go:451] Response Headers:
I0225 20:26:20.954727 2741208 round_trippers.go:454] Content-Length: 90
I0225 20:26:20.954737 2741208 round_trippers.go:454] Cache-Control: no-cache, private
I0225 20:26:20.954743 2741208 round_trippers.go:454] Cache-Control: no-cache, private
I0225 20:26:20.954748 2741208 round_trippers.go:454] Content-Type: application/json
I0225 20:26:20.954752 2741208 round_trippers.go:454] Date: Tue, 25 Feb 2025 12:26:20 GMT
I0225 20:26:20.954757 2741208 round_trippers.go:454] X-Kubernetes-Pf-Flowschema-Uid: 1946d0c6-bb00-4321-ac18-d9d836618e5f
I0225 20:26:20.954762 2741208 round_trippers.go:454] X-Kubernetes-Pf-Prioritylevel-Uid: a0307626-29d0-44b2-a06b-d98bcdd02cb2
I0225 20:26:20.954785 2741208 request.go:1107] Response Body: {"kind":"NodeMetricsList","apiVersion":"metrics.k8s.io/v1beta1","metadata":{},"items":[]}
F0225 20:26:20.955314 2741208 helpers.go:115] error: metrics not available yet
goroutine 1 [running]:
k8s.io/kubernetes/vendor/k8s.io/klog/v2.stacks(0x1)
/root/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/klog/v2/klog.go:1026 +0x8a
k8s.io/kubernetes/vendor/k8s.io/klog/v2.(*loggingT).output(0x28f0b40, 0x3, {0x0, 0x0}, 0xc0001641c0, {0x1ea4100, 0xc000100400}, 0xc000d0f280, 0x0)
/root/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/klog/v2/klog.go:975 +0x569
k8s.io/kubernetes/vendor/k8s.io/klog/v2.(*loggingT).printDepth(0xc0005a79c0, 0x47d0cf, {0x0, 0x0}, {0x0, 0x0}, 0x4df32a, {0xc000d0f280, 0x1, 0x1})
/root/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/klog/v2/klog.go:732 +0x191
k8s.io/kubernetes/vendor/k8s.io/klog/v2.FatalDepth(...)
/root/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/klog/v2/klog.go:1488
k8s.io/kubernetes/vendor/k8s.io/kubectl/pkg/cmd/util.fatal({0xc0004ab840, 0x20}, 0xc0005a7af8)
/root/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/kubectl/pkg/cmd/util/helpers.go:93 +0x145
k8s.io/kubernetes/vendor/k8s.io/kubectl/pkg/cmd/util.checkErr({0x19f0de0, 0xc000d0f230}, 0x18b3b68)
/root/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/kubectl/pkg/cmd/util/helpers.go:188 +0x84f
k8s.io/kubernetes/vendor/k8s.io/kubectl/pkg/cmd/util.CheckErr(...)
/root/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/kubectl/pkg/cmd/util/helpers.go:115
k8s.io/kubernetes/vendor/k8s.io/kubectl/pkg/cmd/top.NewCmdTopNode.func1(0xc00081f080, {0xc000a85da0, 0x2, 0x2})
/root/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/kubectl/pkg/cmd/top/top_node.go:95 +0x185
k8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).execute(0xc00081f080, {0xc000a85d80, 0x2, 0x2})
/root/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/github.com/spf13/cobra/command.go:854 +0x5f8
k8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc0000dcdc0)
/root/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/github.com/spf13/cobra/command.go:958 +0x3ad
k8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).Execute(...)
/root/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/github.com/spf13/cobra/command.go:895

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Feb 25, 2025
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If metrics-server contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@yangjunmyfm192085
Copy link
Contributor

/kind support
Can you provide more detailed information?
You can also refer to the following known issues
Known Issues

@k8s-ci-robot k8s-ci-robot added the kind/support Categorizes issue or PR as a support question. label Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

3 participants