This is simplest tutorial for DEVOPS Monitoring Tools:
Modern applications like Netflix, Hot star, and large-scale SaaS platforms survive because of real-time monitoring and observability. Without continuous visibility into traffic, CPU usage, memory, and failures, production systems become blind.
In this hands-on guide, we implement end-to-end Kubernetes monitoring using:
-
Prometheus – metrics scraping & storage
-
Grafana – visualization & dashboards
-
Kubernetes – orchestration platform
-
Helm – package management
-
Amazon EC2 – infrastructure
-
Kind (Kubernetes in Docker) – local cluster simulation
This setup mirrors real production practices while remaining cost-effective and beginner-friendly.
Why Monitoring & Observability Matter
Monitoring answers:
-
What is happening now?
Observability answers:
-
Why is it happening?
Using Prometheus + Grafana, we monitor:
-
Node health
-
Pod & container metrics
-
CPU, memory, disk, network
-
Application load
-
Kubernetes control-plane components
Architecture Overview
High-level flow:
-
Node Exporter (DaemonSet) runs on every node
-
kube-state-metrics collects cluster state
-
Prometheus scrapes metrics
-
Grafana visualizes metrics via dashboards
-
Helm installs everything as a unified stack
Infrastructure Setup
Step 1: Launch EC2 Instance
-
Instance type:
t2.large -
OS: Ubuntu
-
Storage: Minimum 25 GB
-
Open inbound ports:
-
9090– Prometheus -
3000– Grafana
-
Prerequisites Installation
We install everything using a shell script:
Required Tools
-
Docker
-
kubectl
-
Kind
-
Helm
Verify:
Creating Kubernetes Cluster Using Kind
Kind Configuration
-
1 Control Plane
-
3 Worker Nodes
-
Port mappings enabled
Check:
Installing Prometheus & Grafana Using Helm
Step 1: Create Monitoring Namespace
Step 2: Add Prometheus Helm Repository
Step 3: Install Monitoring Stack
What Helm Deploys Automatically
| Component | Purpose |
|---|---|
| Prometheus | Metrics storage |
| Grafana | Visualization |
| Alertmanager | Alert handling |
| Node Exporter | Node metrics |
| kube-state-metrics | Cluster state |
| DaemonSets | One exporter per node |
| StatefulSets | Alertmanager |
Accessing Grafana & Prometheus
Retrieve Grafana Password
-
Username:
admin -
Password: (decoded value)
Port Forwarding
Access in browser:
-
Grafana →
http://EC2-IP:3000 -
Prometheus →
http://EC2-IP:9090
Grafana Dashboards
Grafana automatically includes:
-
Kubernetes cluster dashboards
-
Node performance
-
Pod resource usage
-
Network traffic
-
CPU & memory trends
You can also import dashboards using Grafana Dashboard IDs (e.g., 15661).
Deploying Sample Voting Application
To demonstrate real-time application monitoring, a microservices-based Voting App is deployed:
Stack Used
-
Frontend: Python / Node.js
-
Cache: Redis
-
Database: PostgreSQL
Services:
-
Vote (NodePort)
-
Result (NodePort)
-
Redis & DB (ClusterIP)
Observing Real-Time Load
As users vote:
-
CPU spikes visible
-
Memory usage increases
-
Network traffic grows
-
Node-level metrics change in real time
This is exactly how production monitoring works.
Key Kubernetes Concepts Demonstrated
| Concept | Usage |
|---|---|
| DaemonSet | Node Exporter on every node |
| Deployment | Application workloads |
| StatefulSet | Alertmanager |
| NodePort | External access |
| ClusterIP | Internal services |
| Namespace | Isolation (monitor) |
Why Helm Is Critical in Real Projects
Without Helm:
-
Hundreds of YAML files
-
Manual updates
-
High error risk
With Helm:
-
One command deployment
-
Version control
-
Rollbacks
-
Production-grade standardization
Cleanup & Cost Control
Important: Terminate EC2 instance to avoid AWS charges.
0 Comments
POST Answer of Questions and ASK to Doubt