• Что бы вступить в ряды "Принятый кодер" Вам нужно:
    Написать 10 полезных сообщений или тем и Получить 10 симпатий.
    Для того кто не хочет терять время,может пожертвовать средства для поддержки сервеса, и вступить в ряды VIP на месяц, дополнительная информация в лс.

  • Пользаватели которые будут спамить, уходят в бан без предупреждения. Спам сообщения определяется администрацией и модератором.

  • Гость, Что бы Вы хотели увидеть на нашем Форуме? Изложить свои идеи и пожелания по улучшению форума Вы можете поделиться с нами здесь. ----> Перейдите сюда
  • Все пользователи не прошедшие проверку электронной почты будут заблокированы. Все вопросы с разблокировкой обращайтесь по адресу электронной почте : info@guardianelinks.com . Не пришло сообщение о проверке или о сбросе также сообщите нам.

How I Set Up Prometheus and Grafana Monitoring on AKS from Scratch

Lomanu4 Оффлайн

Lomanu4

Команда форума
Администратор
Регистрация
1 Мар 2015
Сообщения
1,481
Баллы
155
Setting up a monitoring stack in Kubernetes can be overwhelming if you're doing it for the first time. When I started working with Azure Kubernetes Service (AKS), I realized I needed better visibility into pod and node metrics — that’s when I turned to Prometheus and Grafana.

In this post, I’ll walk you through the exact steps I took to get Prometheus and Grafana running on AKS, along with some lessons I learned along the way.

## ? Why Prometheus + Grafana?

  • Prometheus scrapes and stores time-series data from Kubernetes.
  • Grafana gives you beautiful, customizable dashboards.

Together, they provide powerful insights into your cluster’s performance.

## ?️ Prerequisites

  • Azure CLI installed and authenticated
  • kubectl configured to your AKS cluster
  • Helm 3 installed
  • A working AKS cluster
? Step-by-Step Setup

1. Add the Helm Repos



bash
helm repo add prometheus-community

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.


helm repo add grafana

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.


helm repo update

**Install Prometheus:**

helm install prometheus prometheus-community/prometheus \
--namespace monitoring --create-namespace
Install Grafana:

helm install grafana grafana/grafana \
--namespace monitoring
Access the Grafana UI:

You can port-forward and access Grafana at

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

:

kubectl port-forward svc/grafana 3000:80 -n monitoring

**Login using:**
Username: admin
Password: (from step 4)

**? Importing Dashboards**
Once inside Grafana, go to "Dashboards > Import" and use IDs from Grafana.com like:

Kubernetes Cluster Monitoring: 315

Node Exporter: 1860

**? Lessons Learned**
Always install Prometheus before Grafana if you want dashboards to auto-discover data sources.

Use persistent volumes for Prometheus and Grafana in production.

Set up alerts for critical metrics like pod restarts or high CPU usage.

I’m planning to extend this by:

Setting up AlertManager

Integrating with Slack for alerts

Enabling SSL and Ingress for Grafana

Stay tuned! ?


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

 
Вверх Снизу