Using Cloud Monitoring to Monitor IRIS-Based Applications Deployed in GKE
Tags: devops, kubernetes, tutorial, programming
Published: 2024-05-23 19:19:39

<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">In this article, we’ll look at one of the ways to monitor the InterSystems IRIS data platform (IRIS) deployed in the </span></span></span></span></span></span><a href="https://cloud.google.com/kubernetes-engine" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Google Kubernetes Engine</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> (GKE). The GKE integrates easily with </span></span></span></span></span></span><a href="https://cloud.google.com/monitoring" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Cloud Monitoring</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">, simplifying our task. As a bonus, the article shows how to display metrics from Cloud Monitoring in </span></span></span></span></span></span><a href="https://grafana.com/" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Grafana</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">.&nbsp;</span></span></span></span></span></span></p>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Note that the Google Cloud Platform used in this article is not free (</span></span></span></span></span></span><a href="https://cloud.google.com/pricing/list" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">price list</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">), but you can leverage a </span></span></span></span></span></span><a href="https://cloud.google.com/free" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">free tier</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">. This article assumes that you already have a project in the Google Cloud Platform (referred to as &lt;your_project_id&gt;) and have permission to use it.&nbsp;</span></span></span></span></span></span></p>
<p style="line-height:1.3800000000000001"><!--break--><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">We’ll use the following tools:</span></span></span></span></span></span></p>

<ul>
<li aria-level="1" style="list-style-type:disc"><a href="https://cloud.google.com/sdk/docs/install" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">gcloud</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> version Google Cloud SDK 346.0.0</span></span></span></span></span></span></li>
<li aria-level="1" style="list-style-type:disc"><a href="https://kubernetes.io/docs/tasks/tools/#kubectl" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">kubectl</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> version v1.17.12</span></span></span></span></span></span></li>
<li aria-level="1" style="list-style-type:disc"><a href="https://github.com/derailed/k9s" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">k9s</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> version v0.24.14 (just for fun)</span></span></span></span></span></span></li>
<li aria-level="1" style="list-style-type:disc"><a href="https://helm.sh/docs/intro/install/" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">helm</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> version v3.6.3</span></span></span></span></span></span></li>
<li aria-level="1" style="list-style-type:disc"><a href="https://github.com/roboll/helmfile" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">helmfile</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> version v0.139.9</span></span></span></span></span></span></li>
</ul>
<h1 style="line-height:1.3800000000000001; margin-top:27px"><span style="font-size:20px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">GKE Creation</span></span></span></span></span></span></span></h1>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Let’s start with Kubernetes cluster creation. A </span></span></span></span></span></span><a href="https://cloud.google.com/kubernetes-engine/docs/concepts/regional-clusters" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">regional</span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> </span></span></span></span></span></span><a href="https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">private cluster</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> looks good. Let’s also create network address translation (NAT) to allow traffic from nodes to the Internet.</span></span></span></span></span></span><br><span style="color:#000000;">Initialize connection to Google Platform:</span></p>

<pre style="line-height: 1.38;"><span style="font-size:14px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ gcloud init</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ gcloud auth login</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ gcloud projects list</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ gcloud config set project &lt;your_project_id&gt;</span></span></span></span></span></span></span></pre>
<p>Create a dedicated network:</p>
<pre style="line-height: 1.38;"><span style="font-size:14px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ gcloud compute networks create kubernetes --subnet-mode custom</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ gcloud compute networks subnets create kubernetes --network kubernetes --range 10.20.0.0/24 --region us-east1 --secondary-range pods=10.42.0.0/16,services=172.20.0.0/16</span></span></span></span></span></span></span></pre>
<p><span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Assign a couple of static IPs (for NAT and Grafana endpoint, see below):</span></span></span></span></span></span></p>
<pre style="line-height: 1.38;"><span style="font-size:14px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ gcloud compute addresses create kubernetes --region=us-east1</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ gcloud compute addresses create kubernetes-grafana --region=us-east1</span></span></span></span></span></span></span></pre>
<p><span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Create NAT:</span></span></span></span></span></span></p>
<pre style="line-height: 1.38;"><span style="font-size:14px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ gcloud compute routers create kubernetes --network=kubernetes --region us-east1</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ gcloud compute routers nats create kubernetes --router=kubernetes --nat-all-subnet-ip-ranges --nat-external-ip-pool=kubernetes --region=us-east1</span></span></span></span></span></span></span></pre>
<p style="line-height:1.3800000000000001"><span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Finally create GKE. Kubernetes version is <em>1.20.8-gke.900</em>.</span></span></span></span></span></span><br><span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Last line “<em>enable-stackdriver-kubernetes</em>” means that metrics, logs and events from the cluster will be gathered and sent to Cloud Monitoring – see </span></span></span></span></span></span><a href="https://cloud.google.com/stackdriver/docs/solutions/gke/installing" style="text-decoration:none"><span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Configuring Cloud Operations for GKE</span></span></span></span></span></span></a><font color="#000000" face="Consolas, sans-serif"><span style="font-size: 13.3333px; white-space: pre-wrap;">:</span></font></p>

<pre style="line-height: 1.38;"><span style="font-size:14px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ gcloud container clusters create kubernetes   \</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  --region us-east1                                               \</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  --machine-type e2-small                                   \</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  --num-nodes 1                                                  \</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  --enable-private-nodes                                     \</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  --no-enable-master-authorized-networks         \</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  --cluster-version 1.20.8-gke.900                      \</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  --enable-ip-alias                                               \</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  --cluster-ipv4-cidr 10.24.0.0/14                        \</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  --master-ipv4-cidr 10.0.0.0/28                          \</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  --services-secondary-range-name services      \</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  --cluster-secondary-range-name pods              \</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  --no-enable-autoupgrade                                  \</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  --enable-autorepair                                           \</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  --network kubernetes                                        \</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  --subnetwork kubernetes                                  \</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  --enable-stackdriver-kubernetes </span></span></span></span></span></span></span></pre>
<p><span style="font-size:10pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Let’s connect to the newly created cluster:</span></span></span></span></span></span></p>
<pre style="line-height: 1.38;"><span style="font-size:14px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ gcloud container clusters get-credentials kubernetes --region us-east1 --project &lt;your_project&gt;</span></span></span></span></span></span></span></pre>
<h1 style="line-height:1.3800000000000001; margin-top:27px"><span style="font-size:20px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Default Monitoring</span></span></span></span></span></span></span></h1>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Let’s look at the workloads in our cluster (nice k9s output):</span></span></span></span></span></span></p>

<pre style="line-height: 1.38;"><span style="font-size:14px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ k9s</span></span></span></span></span></span></span></pre>

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pz7wk66ehuqsddrlml36.png)
<p><span>&nbsp;</span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">We see three pods (one for each node). These pods are managed by a </span></span></span></span></span></span><a href="https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">DaemonSet</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">,</span></span></span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> and called by the Google Kubernetes Engine Metrics Agent (gke-metrics-agent). Under the hood, this agent leverages the </span></span></span></span></span></span><a href="https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/design.md" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Open Telemetry Collector</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> enhanced by Google-specific features. You can spend some time looking at its </span></span></span></span></span></span><a href="https://opentelemetry.io/docs/collector/configuration/" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">configuration</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">, which is thoroughly described on the page </span></span></span></span></span></span><a href="https://docs.google.com/document/d/1NeheFG7DmcUYo_h2vLtNRlia9x5wOJMlV4QKEK05FhQ/edit" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">OpenTelemetry Collector Configuration Format</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">.</span></span></span></span></span></span></p>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Because of the gke-metrics-agent, we’re immediately able to see a lot of useful GKE-related metrics on a dashboard in Cloud Monitoring:</span></span></span></span></span></span></p>

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/owl6gnp8h836p3jq3bql.png)
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0e101a"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">To add IRIS metrics (we do not have IRIS in the cluster yet), we deploy an application similar to the gke-metrics-agent, but with our configuration.</span></span></span></span></span></span></p>

<h2 style="line-height:1.3800000000000001; margin-top:24px; margin-bottom:8px"><span style="font-size:20px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">A Note About Application Installation</span></span></span></span></span></span></span></h2>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">A common way to deploy applications in Kubernetes clusters is by using Helm. For this article, several Helm charts were prepared and published in a custom public </span></span></span></span></span></span><a href="https://myardyas.github.io/helm-charts/" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Helm repository</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">. You can see how to do this on </span></span></span></span></span></span><a href="https://helm.sh/docs/topics/chart_repository/#github-pages-example" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">GitHub</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> and in </span></span></span></span></span></span><a href="https://medium.com/containerum/how-to-make-and-share-your-own-helm-package-50ae40f6c221" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">this guide that reviews how to make and share your Helm package</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">. You need to have a Helm chart in a directory for each application according to </span></span></span></span></span></span><a href="https://helm.sh/docs/chart_template_guide/" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">The Chart Template Developer’s Guide</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">, like simple-iris. Then, we package a chart:</span></span></span></span></span></span></p>

<pre style="line-height: 1.38;"><span style="font-size:14px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ helm package simple-iris/</span></span></span></span></span></span></span></pre>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Then move a resulting gzipped archive into a repository directory (gh-pages branch). Then update the index-file:</span></span></span></span></span></span></p>

<pre style="line-height: 1.38;"><span style="font-size:14px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ helm repo index . --url </span></span></span></span></span></span><a href="https://myardyas.github.io/helm-charts/" style="text-decoration:none"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="text-decoration-skip-ink:none">https://myardyas.github.io/helm-charts/</span></span></span></span></span></span></span></a></span></pre>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Push the updated index-file as well as the archive into GitHub.</span></span></span></span></span></span></p>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">We just created the charts for the gke-metrics-agent and IRIS itself. IRIS is a stateless application for our monitoring purpose, so for simplicity, we use the Deployment command instead of Statefulset.</span></span></span></span></span></span></p>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Let’s look at the available charts:</span></span></span></span></span></span></p>

<pre style="line-height: 1.38;"><span style="font-size:14px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ helm repo add iris-monitoring </span></span></span></span></span></span><a href="https://myardyas.github.io/helm-charts/" style="text-decoration:none"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="text-decoration-skip-ink:none">https://myardyas.github.io/helm-charts/</span></span></span></span></span></span></span></a>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ helm repo update</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ helm search repo iris-monitoring --versions --devel --max-col-width 35</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">NAME                               </span></span></span></span></span></span><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"><span style="white-space:pre">              </span></span></span></span></span></span></span><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">CHART VERSION</span></span></span></span></span></span><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"><span style="white-space:pre"> </span></span></span></span></span></span></span><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">APP VERSION   </span></span></span></span></span></span><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"><span style="white-space:pre">      </span></span></span></span></span></span></span><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">DESCRIPTION                        </span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">iris-monitoring/gke-metrics-agen...</span></span></span></span></span></span><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"><span style="white-space:pre"> </span></span></span></span></span></span></span><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">0.1.0        </span></span></span></span></span></span><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"><span style="white-space:pre">              </span></span></span></span></span></span></span><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">1.0.3-gke.0   </span></span></span></span></span></span><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"><span style="white-space:pre"> </span></span></span></span></span></span></span><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">            GKE metrics agent chart (based o...</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">iris-monitoring/metrics-proxy      </span></span></span></span></span></span><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"><span style="white-space:pre">    </span></span></span></span></span></span></span><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">0.1.0        </span></span></span></span></span></span><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"><span style="white-space:pre">              </span></span></span></span></span></span></span><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">7.70.0        </span></span></span></span></span></span><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"><span style="white-space:pre"> </span></span></span></span></span></span></span><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">               Service Chart to add a default m...</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">iris-monitoring/simple-iris        </span></span></span></span></span></span><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"><span style="white-space:pre">       </span></span></span></span></span></span></span><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">0.1.0        </span></span></span></span></span></span><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"><span style="white-space:pre">               </span></span></span></span></span></span></span><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">2021.1.0.215.0</span></span></span></span></span></span><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"><span style="white-space:pre">         </span></span></span></span></span></span></span><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Simple stateless IRIS Community ...</span></span></span></span></span></span></span></pre>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Here we see yet another chart called metrics-proxy. IRIS exposes Prometheus metrics without metrics types, leading to the gke-metrics-agent complaining about an “<em>UNSPECIFIED</em>” type. As a workaround, we send metrics from IRIS to the gke-metrics-agent using metrics-proxy, whose only job is to add a default “gauge” type. You can view the source code of the charts easily in this way:</span></span></span></span></span></span></p>

<pre style="line-height: 1.38;"><span style="font-size:14px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ helm fetch --untar iris-monitoring/simple-iris --version 0.1.0</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ cd simple-iris # browse files here</span></span></span></span></span></span></span></pre>
<h1 style="line-height:1.3800000000000001; margin-top:27px"><span style="font-size:20px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Install IRIS and Monitoring Tools into a Cluster</span></span></span></span></span></span></span></h1>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Having prepared the charts, we can install them. A common way to install Helm charts into clusters is </span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">helm install</span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> or </span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">helm upgrade --install</span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">. But this time, let’s try a more declarative way to do the same thing using </span></span></span></span></span></span><a href="https://github.com/roboll/helmfile" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">helmfile</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">.</span></span></span></span></span></span></p>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Prepare the following file, helmfile.yaml:</span></span></span></span></span></span></p>

<pre style="line-height: 1.38;"><span style="font-size:14px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ cat helmfile.yaml</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">repositories:</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">- name: iris-monitoring</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  url: https://myardyas.github.io/helm-charts</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> </span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">- name: grafana</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  url: https://grafana.github.io/helm-charts</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">helmDefaults:</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  wait: true</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  timeout: 600</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  force: false</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  historyMax: 5</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  createNamespace: true</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  atomic: true</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">releases:</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">- name: simple-iris</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  chart: iris-monitoring/simple-iris</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  namespace: iris</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  version: 0.1.0</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">- name: gke-metrics-agent-custom</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  chart: iris-monitoring/gke-metrics-agent-custom</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  namespace: iris</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  version: 0.1.0</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> </span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">- name: metrics-proxy</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  chart: iris-monitoring/metrics-proxy</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  namespace: iris</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  version: 0.1.0</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">- name: grafana</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  chart: grafana/grafana</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  namespace: grafana</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  version: 6.15.0</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  values:</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  - grafana-values.yaml</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  set:</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  - name: service.loadBalancerIP</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">    value: { requiredEnv "LOAD_BALANCER_IP" }</span></span></span></span></span></span></span></pre>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">This code contains a list of repositories from which we’re going to install some charts. Here are our IRIS-monitoring repository and a public Grafana repository (we’ll use Grafana soon, so you need to install it too).&nbsp;</span></span></span></span></span></span></p>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Besides repositories, the helmfile.yaml file sets default values for things like namespaces if they don’t exist. The most important part of the helmfile is a releases list. The release list is just an installed Helm chart. Each release contains a chart name, namespace, and version. The Grafana release list also sets a custom IP address (to reach the Grafana UI) and </span></span></span></span></span></span><a href="https://grafana.com/tutorials/provision-dashboards-and-data-sources/" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">provisions a data source and dashboard</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> in the grafana-values.yaml file. We must create this file as follows:</span></span></span></span></span></span></p>

<pre style="line-height: 1.38;"><span style="font-size:14px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ cat grafana-values.yaml </span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">service:</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  type: LoadBalancer</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">datasources:</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  datasources.yaml:</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">    apiVersion: 1</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">    datasources:</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">    - name: Google Cloud Monitoring</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">      type: stackdriver</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">      isDefault: true</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">      jsonData:</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">        authenticationType: gce</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">      editable: true</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">      readOnly: true</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">dashboardProviders:</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  dashboardproviders.yaml:</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">    apiVersion: 1</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">    providers:</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">    - name: 'default'</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">      orgId: 1</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">      folder: ''</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">      type: file</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">      disableDeletion: false</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">      editable: true</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">      options:</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">        path: /var/lib/grafana/dashboards/default</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">dashboards:</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">  default:</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">    iris:</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">      gnetId: 14869</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">      revision: 1</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">      datasource: Google Cloud Monitoring</span></span></span></span></span></span></span></pre>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Note</span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#70ad47"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> </span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">that the</span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#70ad47"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> </span></span></span></span></span></span><a href="https://grafana.com/grafana/dashboards/14869" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">dashboard has the number 14869</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">. This dashboard contains several panels with metrics, like those shown by the</span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#70ad47"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> </span></span></span></span></span></span><a href="https://docs.intersystems.com/sam/csp/docbook/DocBook.UI.Page.cls?KEY=ASAM" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">System Alerting and Monitoring Guide</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> (SAM).</span></span></span></span></span></span></p>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Now we’re almost ready to run an installation procedure. The final step is to define an IP address to access Grafana (replace </span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">&lt;your_project_id&gt;</span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> with your project ID):</span></span></span></span></span></span></p>

<pre style="line-height: 1.38;"><span style="font-size:14px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ export LOAD_BALANCER_IP=$(gcloud compute addresses list --project &lt;your_project_id&gt; --filter="name~'kubernetes-grafana'" --format="value(Address)")</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ echo $LOAD_BALANCER_IP</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">x.x.x.x</span></span></span></span></span></span></span></pre>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Let’s finally run an installation:</span></span></span></span></span></span></p>

<pre style="line-height: 1.38;"><span style="font-size:14px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ helmfile sync</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ k9s</span></span></span></span></span></span></span></pre>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Wait for k9s (or kubectl) until all new pods are running:</span></span></span></span></span></span><be> </p>

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3c66ophcmxrcuzdwh26z.png)

<h1 style="line-height:1.3800000000000001; margin-top:27px"><span style="font-size:20px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Visualization in Cloud Monitoring</span></span></span></span></span></span></span></h1>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Note that we didn’t expose the IRIS web port to the world this time. We don’t need it for this article, but you can leverage the port-forward application to check IRIS metrics this way:</span></span></span></span></span></span></p>

<pre style="line-height: 1.38;"><span style="font-size:14px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ kubectl -n iris port-forward svc/simple-iris 52773:52773</span></span></span></span></span></span></span></pre>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Then, in a different terminal, enter the following:</span></span></span></span></span></span></p>

<pre style="line-height: 1.38;"><span style="font-size:14px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ curl -s </span></span></span></span></span></span><a href="http://localhost:52773/api/monitor/metrics" style="text-decoration:none"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="text-decoration-skip-ink:none">http://localhost:52773/api/monitor/metrics</span></span></span></span></span></span></span></a>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">iris_cpu_pct{id="AUXWD"} 0</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">iris_cpu_pct{id="CSPDMN"} 0</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">…</span></span></span></span></span></span></span></pre>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Having checked these metrics, let’s look in the Cloud Monitoring console’s </span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:700"><span style="font-style:normal"><span style="text-decoration:none">Metrics explorer</span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">. Select the </span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:700"><span style="font-style:normal"><span style="text-decoration:none">Global </span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">resource type.</span></span></span></span></span></span></p>

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5shrvizc31ypx33mtyfx.png)
<span>&nbsp;</span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">
Now look at the </span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:700"><span style="font-style:normal"><span style="text-decoration:none">iris_process_count</span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> metric:</span></span></span></span></span></span><br>&nbsp;</p>
<
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4szbyyzuf89tq61e6svp.png) <span>&nbsp;</span></p>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">We can create dashboards that combine these metrics in a single place. But these dashboards are available only for users of this Google project and aren’t very flexible in their settings. Because of that, let’s look at IRIS metrics in a much handier tool: Grafana.</span></span></span></span></span></span></p>

<h1 style="line-height:1.3800000000000001; margin-top:27px"><span style="font-size:20px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Visualization in Grafana</span></span></span></span></span></span></span></h1>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">For a connection to Grafana, use the IP-address, </span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">x.x.x.x</span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">, stored in the </span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">LOAD_BALANCER_IP</span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> variable:</span></span></span></span></span></span></p>

<pre style="line-height: 1.38;"><span style="font-size:14px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ echo ${LOAD_BALANCER_IP}</span></span></span></span></span></span></span></pre>

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8c5meih41eafi6u054ug.png)
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">The </span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:700"><span style="font-style:normal"><span style="text-decoration:none">username</span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> is admin.</span></span></span></span></span></span></p>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">The </span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:700"><span style="font-style:normal"><span style="text-decoration:none">password</span></span></span></span></span></span><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> is the output of:</span></span></span></span></span></span></p>

<pre style="line-height: 1.38;"><span style="font-size:14px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ kubectl get secret --namespace grafana grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo</span></span></span></span></span></span></span></pre>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">The </span></span></span></span></span></span><a href="http://x.x.x.x/d/KN_HZ7n7z/iris?orgId=1&amp;from=now-15m&amp;to=now" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">IRIS dashboard</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> appears.</span></span></span></span></span></span></p>

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4mcxyd4e14wvphsmranf.png)
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Any person who knows the address and password can view this dashboard. Feel free to add your own dashboards.</span></span></span></span></span></span></p>

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3qyoqrn5901aqc5vg7q2.png)

<h1 style="line-height:1.3800000000000001; margin-top:27px"><span style="font-size:20px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Cleanup</span></span></span></span></span></span></span></h1>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">When you’re done, don’t forget to remove unused parts from the Google Cloud Platform. You can remove everything this way:</span></span></span></span></span></span></p>

<pre style="line-height: 1.38;"><span style="font-size:14px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ gcloud --quiet container clusters delete kubernetes --region us-east1</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ gcloud --quiet compute routers nats delete kubernetes --router=kubernetes --region=us-east1</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ gcloud --quiet compute routers delete kubernetes --region=us-east1</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ gcloud --quiet compute addresses delete kubernetes-grafana --region=us-east1</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ gcloud --quiet compute addresses delete kubernetes --region=us-east1</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ gcloud --quiet compute networks subnets delete kubernetes --region us-east1</span></span></span></span></span></span>
<span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Consolas,sans-serif"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">$ gcloud --quiet compute networks delete kubernetes</span></span></span></span></span></span></span></pre>
<p><span style="font-size:20px;"><span style="font-variant: normal; white-space: pre-wrap;"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">Conclusion</span></span></span></span></span></span></span></p>
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">We’ve shown one of the almost endless approaches to monitoring IRIS applications deployed in GKE. This time we’ve focused on metrics stored in Cloud Monitoring and displayed in Grafana. But don’t forget about IRIS logs. Pods logs are, at the moment of writing, gathered by </span></span></span></span></span></span><a href="https://fluentbit.io/" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">fluentbit</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> and sent to Cloud Logging where they can be viewed.</span></span></span></span></span></span></p>

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c0kv9ciqk5vhmk3wco84.png)
<p style="line-height:1.3800000000000001"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">You can find examples of queries at </span></span></span></span></span></span><a href="https://cloud.google.com/logging/docs/view/query-library-preview#kubernetes-filters" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Kubernetes-related queries</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">. It’s interesting to show logs in Grafana too. Project </span></span></span></span></span></span><a href="https://grafana.com/oss/loki/" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Grafana Loki</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none"> is exactly for that. An example of integration is available at </span></span></span></span></span></span><a href="https://www.scaleway.com/en/docs/use-loki-to-manage-k8s-application-logs/" style="text-decoration:none"><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#0000ff"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:underline"><span style="-webkit-text-decoration-skip:none"><span style="text-decoration-skip-ink:none">Use Loki to Manage k8s Application Logs</span></span></span></span></span></span></span></span></a><span style="font-size:11pt; font-variant:normal; white-space:pre-wrap"><span style="font-family:Arial"><span style="color:#000000"><span style="font-weight:400"><span style="font-style:normal"><span style="text-decoration:none">.</span></span></span></span></span></span><br>&nbsp;</p>