<p>It seems that the <a href="https://cloud.google.com/monitoring/agent/install-agent"><strong>Google Monitoring Agent</strong> (powered by <em>Stackdriver</em>)</a> should be installed on each <em>Node</em> (i.e. each compute instance, i.e. each machine) of a <em>Kubernetes</em> cluster.</p>

<p>However the new <em>plugins</em>, like <a href="https://cloud.google.com/monitoring/agent/plugins/nginx">Nginx</a>, <a href="https://cloud.google.com/monitoring/agent/plugins/redis">Redis</a>, <a href="https://cloud.google.com/monitoring/agent/plugins/elasticsearch">ElasticSearch</a>..., need those agents to know the IP of these services. This means having <code>kube-proxy</code> running and set up which should mean running that <em>Google Monitoring Agent</em> on a Pod.</p>

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

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

<p>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.</p>

<p>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:</p>

<ul>
<li>Nginx</li>
<li>Google Monitoring Agent together with the Nginx plugin</li>
</ul>

<p>Note: Not fully tested yet.</p>
