DEV Community

Cover image for Setup Prometheus monitoring on k8s :
Rahul Kumar
Rahul Kumar

Posted on • Edited on

1 2

Setup Prometheus monitoring on k8s :

What is Prometheus :

Prometheus is an open source application monitoring software which is used to achieve the continuous monitoring of our application state .

Let's set up a sample monitoring in our k8s cluster with Prometheus and Grafana :

prom and graph

  • Instead of creating all the configuration files we are going to use Prometheus Helm charts
  • And Internally Kubernetes operators are going to manage all the configurations .

  • Install the Prometheus Helm Chart :

$helm install --name prometheus stable/prometheus

  • Have a look at some default files that we are going to need in the future using these commands .

$kubectl get pod

$kubectl get service

$kubectl get configmap

$kubectl get cidr

$kuctktl get statefulsets

  • Two things we need to take care of when we add a new configuration to our cluster .
  1. About the configuration settings
  2. About the Alert manager
  • Access the grafana dashboard by using the port-forward command .
  • Check in which port Grafana dashboard is running

$kubectl logs prometheus-grafana-5c5885d488-b9mlj

$ kubectl port-forward -n prometheus prometheus-grafana-5c5885d488-b9mlj 3000

  • Then open the browser and visit to

http://localhost:3000

  • On the login page, enter admin for username and password.

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay