In this post I will show you how to quickly get up and running with Grafana Cloud Monitoring your Kubernetes Cluster and Demo app. This post is building off a previous post where we deployed a demo web store app on Kubernetes running on your laptop. While you can use any Kubernetes Cluster, the app does need to be deployed the same way for this to work.
Let’s get started!
First you will need to sign up for a free Grafana Cloud Account
Don’t worry, the link is legit and it doesn’t require a credit card. It is pro version for a week but then converts to free forever. What I am showing in this blog post is all working in a free account. Still not sure? I also work for Grafana check my LinkedIn here!
Once you are logged in to Grafana Cloud go through the Wizard to create a new stack, I just used the defaults, then click Launch

You should see a page like this, you may have to click through some getting started screens first.

Noe on the left click Kubernetes then click start sending data

Click Install to install the backend and alert rules

Next, enter your cluster name, it must match the cluster name of the environment where you are going to install this Helm chart. In my previous blog it is k3d-rkb-otel-demo if you are unsure type the following at a command line.
NOTE: The cluster name needs to match where the OTEL Demo app is deployed!
kubectl config get-clusters

Now select the Kubernetes Environment you are on and select all the features except Node Logs, if your K8S cluster supports Node Logs you can select that. The K8S cluster we setup in my previous post does not support Node Logs.

Now create an access token, this is so your local environment can send data up to your Grafana Cloud Stack.

Now copy the Helm chart to your clipboard

Paste the Helm code to your terminal of your K8S server where you have the OTEL Demo app running from my previous post. The results should look something like this:

Please Note! If you are not using the guide from my previous post you may not see some data in Grafana Cloud. Specifically you need to point your OTEL collectors to Grafana Alloy that get’s deployed in this Helm chart. For example when you configure your app make sure you have all the services configured with:
default: envOverrides: - name: OTEL_COLLECTOR_NAME value: grafana-k8s-monitoring-alloy-receiver.default.svc.cluster.local
Now go back to Grafana Cloud and click Go to Homepage

It may take several minutes to start sending data, if you don’t see the following, click the refresh rate to 5 min. then keep clicking refresh until you see the following screen.

Explore around your Kubernetes Environment using the Menu on the left

What you see above is the Infrastructure layer, this helps to manage your K8S servers, nodes and workload but what about that Shopping cart app? Let’s dive into the Application now using App0111y. Click Application on the left and then click enable Metrics Generation!

Now click the check box and click activate

Now you can see all your service that make up the Shopping Cart app. Click on add service to explore further

Notice how much data you are getting about this micro service. Now click on logs

Notice you can see and search all the logs for this service, Now click on JVM to view the Java Virtual Machine Metrics

Notice you can see all the JVM Metrics

Check out the Logs Explorer too:

Next we are going to enable Asserts so you can get a better handle on common problems in your environment and quickly resolve them. I have a whole post just on Asserts.
Pingback: My First Grafana Asserts – RyanKellysBlog.com