Get request count from Kubernetes service

6/13/2018

Is there any way to get statistics such as service / endpoint access for services defined in Kubernetes cluster?

I've read about Heapster, but it doesn't seem to provide these statistics. Plus, the whole setup is tremendously complicated and relies on a ton of third-party components. I'd really like something much, much simpler than that.

I've been looking into what may be available in kube-system namespace, and there's a bunch of containers and services, there, Heapster including, but they are effectively inaccessible because they require authentication I cannot provide, and kubectl doesn't seem to have any API to access them (or does it?).

-- wvxvw
kubernetes
monitoring

1 Answer

6/13/2018

Heapster is the agent that collects data, but then you need a monitoring agent to interpret these data. On GCP, for example, that's fluentd who gets these metrics and sends to Stackdriver.

Prometheus is an excellent monitoring tool. I would recommend this one, if youare not on GCP.

If you would be on GCP, then as mentioned above you have Stackdriver Monitoring, that is configured by default for K8s clusters. All you have to do is to create a Stackdriver accound (this is done by one click from GCP Console), and you are good to go.

-- suren
Source: StackOverflow