kubernetes: Kubectl top no doesn't wotk when using HPA without heapster
Currently
kubectl top no
Doesn’t work when using HPA without heapster, there’s some files to change under utilmetrics/
we might want this for 1.10
/assign /sig cli
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (10 by maintainers)
$ kubectl top pod boston-pod Error from server (NotFound): the server could not find the requested resource (get services http:heapster:)
Is there any other way to get cpu/mem usage for a pod?
+1
“message”: “the server is currently unable to handle the request (get services http:heapster:)”, “reason”: “ServiceUnavailable”, “details”: { “name”: “http:heapster:”, “kind”: “services”, “causes”: [ { “reason”: “UnexpectedServerResponse”, “message”: “Error: ‘dial tcp 10.48.0.70:8082: getsockopt: connection timed out’\nTrying to reach: ‘http://10.48.0.70:8082/apis/metrics/v1alpha1/namespaces/default/pods?labelSelector=’”
We have both heapster and metrics-server, so not really sure which one should fetch the information.
service/heapster ClusterIP 10.0.20.249 <none> 80/TCP 7d service/kube-dns ClusterIP 10.0.16.10 <none> 53/UDP,53/TCP 7d service/kubernetes-dashboard ClusterIP 10.0.22.112 <none> 80/TCP 7d service/metrics-server ClusterIP 10.0.26.120 <none> 443/TCP 5d
I have a k8s 1.13 cluster running and have the same error message than @HaymonEdmur from his comment.
I’ve checked the presence of
metrics.k8s.io
as told by @DirectXMan12 and it was missing. I have installed it from the kubernetes-incubator/metrics-server project with thekubectl create -f deploy/1.8+/
command. Now themetrics.k8s.io
api service is present from the output of thekubectl get apiservices
command.Now when I’m running the top command, I have the following :
The
kubectl top nodes
returns the error message directly, it sad by okay. Thekubectl top pods
returns nothing and that’s really surprising me as I have running pods.Is there anything I’m doing wrong here?
@DirectXMan12 - closing this one, since this is landing in 1.10.