Deploying Prometheus and Grafana on Kubernetes

Monitoring a Kubernetes Cluster is the need of the hour for any application following a microservices architecture. There are a bunch of solutions that one can implement to monitor their Kubernetes workload and one of them is Prometheus and Grafana. This article will help you to deploy Prometheus and Grafana in your kubernetes cluster with the help of prometheus-operator.

But before setting up these components let’s understand a bit about each of them.


Prometheus is a pull-based open-source monitoring and alerting tool originally built by SoundCloud. It works on a time-series database and scrapes metrics at a given interval from HTTP endpoints. After Kubernetes, Prometheus joined the Cloud Native Computing Foundation in 2016 as the second hosted project.


The Alertmanager takes care of alerts sent by alerting tools such as the Prometheus server. It handles grouping, silencing, and routing them to the correct receiver integration such as email, PagerDuty, Slack, etc. It also supports the inhibition of alerts.


Grafana is the visual representation of metrics collected by a data source which in our case happens to be Prometheus. We can create or import dashboards for grafana which will make use of promQL to visually represent metrics collected by Prometheus.

Continue reading “Deploying Prometheus and Grafana on Kubernetes”

Explore More on StatefulSets in K8s

Do you have a requirement to deploy a stateful application in your Kubernetes cluster? If yes, then this is the right article for you. Kubernetes has various controllers and the one we are going to be talking about today is StatefulSet Controller which will help us achieve the aforementioned task.

What is a StatefulSet?

Statefulset is a Kubernetes object that deploys and scales a group of Kubernetes pods but so does the deployment. Generally, when we have a deployment, we don’t care how pods are scheduled and what name they get, but in some cases, it is important that pods are deployed in order and have the same name through all the restarts and reschedules. This is where statefulset comes into the picture. Statefulset allocates a sticky identity[ a number starting from 0] to every pod instead of appending a random string to the pod’s name. Every pod in statefulset is started in a sequential order, so if for some reason pod-0 didn’t start, pod-1,2,3 and so on wouldn’t start as well.

Continue reading “Explore More on StatefulSets in K8s”