kubeadm-workshop icon indicating copy to clipboard operation
kubeadm-workshop copied to clipboard

Autoscale based on node metrics exposed to Prometheus by Node exporter

Open swatisehgal opened this issue 5 years ago • 2 comments

I am trying to access the values of node metrics (exposed by node exporter to Prometheus) in custom metrics API which appear e.g. jobs.batch/node_memory_MemTotal. But when I do kubectl get --raw "/apis/custom.metrics.k8s.io/v1beta1/namespaces/default/batch.jobs/node_memory_MemTotal" | jq . I get Error from server (NotFound): the server could not find the requested resource

swatisehgal avatar Nov 02 '18 17:11 swatisehgal

When I run kubectl get --raw "/apis/custom.metrics.k8s.io/v1beta1" | jq . I see the following metrics but am unable to access their values { "name": "jobs.batch/node_memory_MemTotal", "singularName": "", "namespaced": false, "kind": "MetricValueList", "verbs": [ "get" ] }, { "name": "jobs.batch/node_netstat_TcpExt_TCPHPHits", "singularName": "", "namespaced": false, "kind": "MetricValueList", "verbs": [ "get" ] }, { "name": "jobs.batch/node_netstat_TcpExt_TCPReqQFullDrop", "singularName": "", "namespaced": false, "kind": "MetricValueList", "verbs": [ "get" ] }, { "name": "jobs.batch/node_netstat_Icmp6_InEchoReplies", "singularName": "", "namespaced": false, "kind": "MetricValueList", "verbs": [ "get" ] }

swatisehgal avatar Nov 02 '18 17:11 swatisehgal

I referred to https://github.com/kubernetes-incubator/metrics-server/issues/90#issuecomment-412648296 in the issue https://github.com/kubernetes-incubator/metrics-server/issues/90 but wasn't able to access the metric values

swatisehgal avatar Nov 02 '18 17:11 swatisehgal