List of nodes instance prometheus

3/18/2019

Is it possible get list of nodes instance with prometheus. I have a node exporter but I don't see metrics like that.

Should we add a new operator?

-- M.Hol
kubernetes
prometheus

1 Answer

3/27/2019

You can use kube-state-metrics for this purpose.

kube-state-metrics is about generating metrics from Kubernetes API objects without modification. This ensures, that features provided by kube-state-metrics have the same grade of stability as the Kubernetes API objects themselves. In turn this means, that kube-state-metrics in certain situations may not show the exact same values as kubectl, as kubectl applies certain heuristics to display comprehensible messages. kube-state-metrics exposes raw data unmodified from the Kubernetes API, this way users have all the data they require and perform heuristics as they see

You can find node metrics here. For example:

Metric name: kube_node_info
node=<node-address> 
kernel_version=<kernel-version> 
os_image=<os-image-name> 
container_runtime_version=<container-runtime-and-version-combination> 
kubelet_version=<kubelet-version> 
kubeproxy_version=<kubeproxy-version> 
provider_id=<provider-id
-- VKR
Source: StackOverflow