—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
/assign
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
Prevent issues from auto-closing with an /lifecycle frozen
comment.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or @fejta
.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or @fejta
.
/lifecycle rotten
/remove-lifecycle stale
I think this can be closed, since kubectl top node --help
provides the requested information.
Closed #44540.
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen
.
Mark the issue as fresh with /remove-lifecycle rotten
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close
in my case it was version mismatch between kubectl client and api server (I had a newer client)
using the correct version of the client solved the error mentioned (for those who got here after searching google for the error message)
Hey, I'm using k8 1.7 and running hepaster. When I run $ kubectl top nodes --heapster-namespace=kube-system, it shows me "error: metrics not available yet". Any clue for tackling the error?
@xmik thanks for the help. Is there a way to get GPU usage information?
I got the same issue with Kubernetes 1.11 & latest Heapster.
$kubectl top pod --namespace=kube-system
W0813 13:48:08.426536 27831 top_pod.go:263] Metrics not available for pod kube-system/calico-node-8d5d4, age: 38m1.426522624s
error: Metrics not available for pod kube-system/calico-node-8d5d4, age: 38m1.426522624s
Hi,
I have the same behavior even if heapster is on the kube-system namespaces.
What i don't understand it's why even if it's an deprecated project replace by metrics-server do we still need to find an heapster service on the cluster...
Regards,
Any update from anyone in the metrics-server community? Heapster is deprecated as mentioned above, yet the metrics-server commands are still asking for a heapster server. @DirectXMan12 @piosz
When error: metrics not available yet
happened to me it ended up being an error with the metrics deployment itself. I did a kubectl get pods -n kube-system
, found the metrics pod and a kubectl describe pod...
helped me diagnose why the deployment wouldn't work.
I had to patch this default metrics-server deployment:
https://raw.githubusercontent.com/kubernetes/kops/master/addons/metrics-server/v1.8.x.yaml
with these changes:
containers:
- name: metrics-server
image: gcr.io/google_containers/metrics-server-amd64:v0.3.0
imagePullPolicy: Always
command:
- /metrics-server
- --kubelet-preferred-address-types=InternalIP
# - --source=kubernetes.summary_api:''
And that got things working for me.
@gdoctor these days, the only reason it should ask about Heapster is if the resource metrics API isn't available. The kubectl top
logic prefers using the resource metrics API, but will fall back to Heapster if it isn't present (to give people time to upgrade clusters and clients), which means if neither are working, you'll see an error about Heapster.
@s1113950 that kops manifest appears to be out of date/not actually tests. v0.3.0 changed how the options are specified, so it makes sense that you needed to make that change. Please file an issue with the kops repository.
Hi All
I am facing the same issue on with kubectl top pod command with above 1.10 version also
root@:/home# kubectl version
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.0", GitCommit:"91e7b4fd31fcd3d5f436da26c980becec37ceefe", GitTreeState:"clean", BuildDate:"2018-06-27T20:17:28Z", GoVersion:"go1.10.2", Compiler:"gc", Platform:"linux/amd64"}
Getting the below error:
Error from server (NotFound): the server could not find the requested resource (get services http:heapster:)
can anyone help me out this
Hi All
I am facing the same issue on with kubectl top pod command with above 1.10 version also
root@:/home# kubectl version
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.0", GitCommit:"91e7b4fd31fcd3d5f436da26c980becec37ceefe", GitTreeState:"clean", BuildDate:"2018-06-27T20:17:28Z", GoVersion:"go1.10.2", Compiler:"gc", Platform:"linux/amd64"}Getting the below error:
Error from server (NotFound): the server could not find the requested resource (get services http:heapster:)can anyone help me out this
Same problem here, using kubernetes 1.11 on digitalocean
Same problem using kubernetes v1.12.2
please make sure you've deployed metrics-server and have the metrics.k8s.io
API correctly registered (check kubectl get apiservices
)
I can confirm this starts to appear again in kops 1.11.0 even with
--kubelet-insecure-tls and --kubelet-preferred-address-types=InternalIP
for metrics server command line.
it seems above works in kops 1.10.0
tested in k8s versions below and works well in kops 1.10.0 but not when with kops 1.11.0
1.10.12 1.11.1 1.11.3 1.11.5 1.11.7
I know this --kubelet-insecure-tls
will make it work. but is important to note that this is useful in test clusters with self-signed Kubelet serving certificates but is not recommended for production usage
For me, the problem is I didn't install the metric server and installing metric server is worked for me:
$ git clone https://github.com/kodekloudhub/kubernetes-metrics-server.git
$ kubectl create -f kubernetes-metrics-server/
reference from : https://stackoverflow.com/questions/52860209/kubernetes-1-11-could-not-find-heapster-for-metrics
hope it can helps.
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Thanks lot Kaniwei, its worked for me
For me, the problem is I didn't install the metric server and installing metric server is worked for me:
$ git clone https://github.com/kodekloudhub/kubernetes-metrics-server.git
$ kubectl create -f kubernetes-metrics-server/
reference from : https://stackoverflow.com/questions/52860209/kubernetes-1-11-could-not-find-heapster-for-metrics
hope it can helps.
this was the only solution for me thanks
I have same issue in Digital Ocean.
@alexsandro-xpt have you tried installing metric server as suggested by @kainwei , It worked for me
Still have the issue...
kubectl version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.8", GitCommit:"9f2892aab98fe339f3bd70e3c470144299398ace", GitTreeState:"clean", BuildDate:"2020-08-13T16:12:48Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.3", GitCommit:"2e7996e3e2712684bc73f0dec0200d64eec7fe40", GitTreeState:"clean", BuildDate:"2020-05-20T12:43:34Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
[root@k8smaster ~]# kubectl create -f kubernetes-metrics-server/
clusterrole.rbac.authorization.k8s.io/system:aggregated-metrics-reader created
clusterrolebinding.rbac.authorization.k8s.io/metrics-server:system:auth-delegator created
rolebinding.rbac.authorization.k8s.io/metrics-server-auth-reader created
apiservice.apiregistration.k8s.io/v1beta1.metrics.k8s.io created
serviceaccount/metrics-server created
deployment.apps/metrics-server created
service/metrics-server created
clusterrole.rbac.authorization.k8s.io/system:metrics-server created
clusterrolebinding.rbac.authorization.k8s.io/system:metrics-server created
[root@k8smaster ~]# kubectl top nodes
Error from server (ServiceUnavailable): the server is currently unable to handle the request (get nodes.metrics.k8s.io)
[root@k8smaster ~]# kubectl top pods
Error from server (ServiceUnavailable): the server is currently unable to handle the request (get pods.metrics.k8s.io)