HomeTutorsContact
Kubernetes - Container-Orchestration System
How to Install Prometheus on Kubernetes Cluster?
Anton Putra
March 03, 2021
1 min

In this video, we will install Prometheus using Prometheus Operator. We will also, install Grafana and Alertmanager and create a dashboard for Prometheus itself. Finally, we will create alerting rule with Slack integration.

Let’s get started by installing Prometheus Operator, which is a tool developed to manage the lifecycle of Prometheus. It is also used to add targets to Prometheus to scrape and alerting rules via Custom Resource Definitions.

Create Custom Resource Definitions for Prometheus Operator

In this lesson, we going to use the following CRDs: Alertmanager, Prometheus, PrometheusRule, ServiceMonitor.

Deploy Prometheus Operator

Deploy Prometheus

Now we have everything to start deploying Prometheus to our Kubernetes cluster. We will use Prometheus CRD to create and manage our instance.

  • We can access Prometheus locally http://localhost:9090 using port-forward command

If you navigate to the targets, you’ll see that we don’t have any just yet, let’s create the first by scraping Prometheus itself.

Deploy Grafana and create a dashboard for Prometheus.

  • Generate username and a password for Grafana use

To integrate Prometheus with Grafana we need to add a data source pointing to the Prometheus service http://prometheus-operated.monitoring:9090. Also, let’s import the existing open-source dashboard for Prometheus.

Deploy Alertmanager.


Tags

#Kubernetes#Prometheus#Grafana

Anton Putra

DevOps Engineer

Big Data | DevOps engineer with hands-on experience in building large, scalable batch and real-time applications with Apache Spark, Hive, Flink on top of Kubernetes; designing and developing CI/CD pipelines.

Expertise

Kubernetes
Terraform
AWS
GCP

Social Media

youtubefacebooklinkedinwebsite

Related Posts

Install MongoDB on Kubernetes
How to Install MongoDB on Kubernetes?
March 07, 2021
1 min
© 2021, All Rights Reserved.

Quick Links

About UsContact Us

Social Media