Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I run Google Monitoring Agent inside a Kubernetes Pod?

It seems that the Google Monitoring Agent (powered by Stackdriver) should be installed on each Node (i.e. each compute instance, i.e. each machine) of a Kubernetes cluster.

However the new plugins, like Nginx, Redis, ElasticSearch..., need those agents to know the IP of these services. This means having kube-proxy running and set up which should mean running that Google Monitoring Agent on a Pod.

These two conflict: On one side that agent monitors the entire machine, on the other it monitor services running on one or more machines.

Can these Stackdriver plugins work on a Google Container Engine (GKE) / Kubernetes cluster?

like image 262
Wernight Avatar asked Mar 14 '16 13:03

Wernight


1 Answers

To monitor each machine (memory, CPU, disk...) it's possible to install the agent on each node (i.e. on each Compute Instance of your GKE cluster). Note that it'll not work with auto-scaling in the sense that re-created nodes won't have the agent installed.

To monitor services (number of requests/s, client connection...) it's possible to install the agent plugin in another container so that for example Nginx Pod run two containers:

  • Nginx
  • Google Monitoring Agent together with the Nginx plugin

Note: Not fully tested yet.

like image 187
Wernight Avatar answered Nov 05 '22 05:11

Wernight