DEV Community

Cover image for Deploying Prometheus and Grafana using Helm in EKS
arun kumar bingari
arun kumar bingari

Posted on

17

Deploying Prometheus and Grafana using Helm in EKS

Introduction

Image description
Prometheus is a popular open-source monitoring solution that provides metrics storage, querying, and alerting capabilities. Grafana, on the other hand, is a widely used visualization and analytics platform for monitoring data.

In this blog, we will discuss how to deploy Prometheus and Grafana using Helm in an EKS (Elastic Kubernetes Service) cluster.

Prerequisites

Before we get started, you will need the following:

  1. An AWS account
  2. An EKS cluster
  3. A running Kubernetes cluster
  4. The Helm package manager installed on your system

Step 1: Install Helm

Image description

Helm is a package manager for Kubernetes that simplifies the installation and management of Kubernetes applications. To install Helm, follow the instructions provided in the official Helm documentation.

Step 2: Add the Prometheus and Grafana repositories to Helm

To add the Prometheus and Grafana repositories to Helm, use the following commands:



helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add grafana https://grafana.github.io/helm-charts


Enter fullscreen mode Exit fullscreen mode

Step 3: Create a new namespace

The following command will create a new namespace named monitoring:



$ kubectl create namespace monitoring


Enter fullscreen mode Exit fullscreen mode

Step 4: Install Prometheus

To install Prometheus, use the following command:



$ helm install prometheus prometheus-community/kube-prometheus-stack --namespace monitoring


Enter fullscreen mode Exit fullscreen mode

This command will install the kube-prometheus-stack chart from the prometheus-community repository and create the necessary Kubernetes resources.

Step 5: Accessing the Prometheus GUI

Image description

To access the Prometheus GUI, we will use a port-forward command to connect to the Prometheus pod running in your EKS cluster. The following command will create a port-forward connection to the Prometheus pod:



$ kubectl port-forward prometheus-kube-prometheus-stack-prometheus-0 9090


Enter fullscreen mode Exit fullscreen mode

Step 6: Install Grafana

To install Grafana, use the following command:



$ helm install grafana grafana/grafana --namespace monitoring


Enter fullscreen mode Exit fullscreen mode

This command will install the Grafana chart from the Grafana repository and create the necessary Kubernetes resources.

Step 7: Accessing Grafana

Image description



kubectl port-forward svc/grafana 3000:80


Enter fullscreen mode Exit fullscreen mode

This command will forward the Grafana service port to your local machine's port 3000. Now, you can access Grafana by opening a web browser and navigating to http://localhost:3000.

Conclusion

In this blog post, we have discussed how to deploy Prometheus and Grafana using Helm in an EKS cluster. We have also covered the steps required to configure Prometheus as a data source in Grafana. With these tools in place, you can monitor your Kubernetes cluster and applications easily and efficiently.

Image of AssemblyAI tool

Transforming Interviews into Publishable Stories with AssemblyAI

Insightview is a modern web application that streamlines the interview workflow for journalists. By leveraging AssemblyAI's LeMUR and Universal-2 technology, it transforms raw interview recordings into structured, actionable content, dramatically reducing the time from recording to publication.

Key Features:
🎥 Audio/video file upload with real-time preview
🗣️ Advanced transcription with speaker identification
⭐ Automatic highlight extraction of key moments
✍️ AI-powered article draft generation
📤 Export interview's subtitles in VTT format

Read full post

Top comments (0)

Billboard image

Try REST API Generation for Snowflake

DevOps for Private APIs. Automate the building, securing, and documenting of internal/private REST APIs with built-in enterprise security on bare-metal, VMs, or containers.

  • Auto-generated live APIs mapped from Snowflake database schema
  • Interactive Swagger API documentation
  • Scripting engine to customize your API
  • Built-in role-based access control

Learn more

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay