-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Cannot fetch Pods Metrics on Kubernetes 1.19 #629
Comments
I am facing the same issue, did you find any solution for this? |
This looks like a bug in Kubernetes 1.19 kubernetes/kubernetes#94281 |
@serathius I am not sure if it is only in Kubernetes 1.19. I've already done tests on 18.5 and 18.10 and the error persists. |
@kewynakshlley If your experiencing problem on different K8s version please file a separate issue and provide all information requested in issue template. |
It s quite frustrating that metrics-server doesn't work , from one side I am glad to know I am not alone in this case, to get kubernetes and don't be able to use autoscalling is strange for me 🤪. I tried different deployment with helm or by using manifests, without success. |
Sorry for that, unfortunately Metrics Server is very infrastructure dependent. |
PR adding debug instructions for issue in Kubernetes 1.19 #632 |
@osaffer Please use those instructions to confirm that you're affected by problem in Kubernetes 1.19: Please check if your Kubelet is correctly returning pod metrics. You can do that by checking Summary API on any node in your cluster: NODE_NAME=<Name of node in your cluster>
kubectl get --raw /api/v1/nodes/$NODE_NAME/proxy/stats/summary This will return JSON that will have two keys One liner for number of pod metrics reported by first node in cluster (requires jq): kubectl get --raw /api/v1/nodes/$(kubectl get nodes -o json | jq -r '.items[0].metadata.name')/proxy/stats/summary | jq '.pods | length' |
Hi, These are the results : kubectl get --raw /api/v1/nodes/$NODE_NAME/proxy/stats/summary kubectl get --raw /api/v1/nodes/$(kubectl get nodes -o json | jq -r '.items[0].metadata.name')/proxy/stats/summary | jq '.pods | length' |
About version kubelet --version |
The fix PR google/cadvisor#2714 has been merged. |
This is the result of docker version Should I do something more? docker version Server: Docker Engine - Community |
@osaffer Your Docker Engine Server is using 18.09.7 which is affected. |
Hi I have just upgraded all my nodes docker version Server: Docker Engine - Community Unfortunately still no metrics for pods. |
Interesting |
Have you done same debugging steps provided above to ensure that problem is still on Kubelet side? |
I would like to thank you for your support.
Now it works very well. Thank you very much |
Thanks for working with us on the workaround. Hope this is fixed upstream soon. Closing as issue was resolved. |
@serathius I am facing this issue with kubernetes cluster v 1.17, is this issue cluster version specific ? |
Do you at least get the metrics for pods and nodes ? |
To my knowledge this bug is specific to 1.19. Please ask in original issue kubernetes/kubernetes#94281 For Prometheus issues please ask on https://github.com/DirectXMan12/k8s-prometheus-adapter |
What happened:
Cannot fetch pods metrics, while can fetch nodes metrics
What you expected to happen:
Fetch pods and nodes metrics
Environment:
kubectl version --short
Client Version: v1.19.3
Server Version: v1.19.3
helm list -n operations
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
metrics-server operations 2 2020-11-05 23:26:48.971057805 +0100 CET deployed metrics-server-4.5.2 0.3.7
kubectl top nodes
NAME CPU(cores) CPU% MEMORY(bytes) MEMORY%
master 251m 6% 2433Mi 15%
worker1 577m 14% 9957Mi 62%
worker2 418m 10% 8143Mi 50%
worker3 445m 11% 7755Mi 48%
kubectl top pods
W1106 20:50:15.238493 73592 top_pod.go:265] Metrics not available for pod default/quickstart-es-default-0, age: 22h29m11.238478174s
error: Metrics not available for pod default/quickstart-es-default-0, age: 22h29m11.238478174s
kubectl get apiservices | grep metrics
v1beta1.metrics.k8s.io operations/metrics-server True
Command in deployment
- metrics-server
- --v=2
- --secure-port=8443
- --kubelet-insecure-tls
- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
Logs 👍 1 reststorage.go:160] unable to fetch pod metrics for pod falco/falco-7l2br: no metrics known for pod
E1106 19:53:35.125749 1 reststorage.go:160] unable to fetch pod metrics for pod nginx-ingress/nginx-ingress-contoller-nginx-ingress-controller-fr7dr: no metrics known for pod
E1106 19:53:35.125753 1 reststorage.go:160] unable to fetch pod metrics for pod rook-ceph/rook-ceph-mon-c-796f667d67-f52z9: no metrics known for pod
E1106 19:53:35.125758 1 reststorage.go:160] unable to fetch pod metrics for pod rook-ceph/csi-cephfsplugin-nlgkh: no metrics known for pod
E1106 19:53:35.125763 1 reststorage.go:160] unable to fetch pod metrics for pod rook-ceph/rook-ceph-operator-86756d44-p99zn: no metrics known for pod
E1106 19:53:35.125768 1 reststorage.go:160] unable to fetch pod metrics for pod rook-ceph/csi-cephfsplugin-7zbgw: no metrics known for pod
E1106 19:53:35.125772 1 reststorage.go:160] unable to fetch pod metrics for pod istio-system/istiod-5d884bcc7-vwmd7: no metrics known for pod
E1106 19:53:35.125777 1 reststorage.go:160] unable to fetch pod metrics for pod civi/civi-postgresql-ha-postgresql-0: no metrics known for pod
E1106 19:53:35.125782 1 reststorage.go:160] unable to fetch pod metrics for pod civi/civi-postgresql-ha-pgpool-5fc9b6c697-xm56b: no metrics known for pod
E1106 19:53:35.125787 1 reststorage.go:160] unable to fetch pod metrics for pod istio-system/jaeger-75948789b4-vwf4c: no metrics known for pod
E1106 19:53:35.125791 1 reststorage.go:160] unable to fetch pod metrics for pod rook-ceph/rook-ceph-mgr-a-58f68569bd-kjbxb: no metrics known for pod
E1106 19:53:35.125796 1 reststorage.go:160] unable to fetch pod metrics for pod kube-system/kube-proxy-czrq4: no metrics known for pod
E1106 19:53:44.207989 1 reststorage.go:160] unable to fetch pod metrics for pod istio-system/istiod-5d884bcc7-vwmd7: no metrics known for pod
E1106 19:53:44.212919 1 reststorage.go:160] unable to fetch pod metrics for pod istio-system/istio-ingressgateway-56b8d79bfc-cmllm: no metrics known for pod
E1106 19:53:59.216758 1 reststorage.go:160] unable to fetch pod metrics for pod istio-system/istiod-5d884bcc7-vwmd7: no metrics known for pod
E1106 19:53:59.226368 1 reststorage.go:160] unable to fetch pod metrics for pod istio-system/istio-ingressgateway-56b8d79bfc-cmllm: no metrics known for pod
E1106 19:54:15.479157 1 reststorage.go:160] unable to fetch pod metrics for pod istio-system/istiod-5d884bcc7-vwmd7: no metrics known for pod
E1106 19:54:15.483252 1 reststorage.go:160] unable to fetch pod metrics for pod istio-system/istio-ingressgateway-56b8d79bfc-cmllm: no metrics known for pod
So how to fetch metrics from pods ?
Thank you
The text was updated successfully, but these errors were encountered: