• Stars
    star
    799
  • Rank 54,880 (Top 2 %)
  • Language
  • Created about 1 year ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[WIP]: Repo for learning how monitor your kubernetes clusters using prometheus and visualize using grafana

Prometheus-Grafana-Zero-to-Hero

This is a Work-In-Progress Repo for learning how monitor your kubernetes clusters using prometheus and visualize using grafana.

Both Prometheus and Grafana have a very good documentation

Prometheus Docs

Grafana Docs

Pre-Requisite

  • Kubernetes Cluster (can be minikube)
  • Helm

If you don't have them installed. Follow the below links:

Install Minikube

Install Helm



It all starts with Monitoring

Monitoring your Kubernetes cluster is essential for ensuring the health and performance of your applications and infrastructure. Here are some reasons why monitoring your Kubernetes cluster is important:

  • Identify issues and troubleshoot: By monitoring your Kubernetes cluster, you can quickly identify issues such as application crashes, resource bottlenecks, and network problems. With real-time monitoring, you can troubleshoot issues before they escalate and impact your users.

  • Optimize performance and capacity: Monitoring allows you to track the performance of your applications and infrastructure over time, and identify opportunities to optimize performance and capacity. By understanding usage patterns and resource consumption, you can make informed decisions about scaling your infrastructure and improving the efficiency of your applications.

  • Ensure high availability: Kubernetes is designed to provide high availability for your applications, but this requires careful monitoring and management. By monitoring your cluster and setting up alerts, you can ensure that your applications remain available even in the event of failures or unexpected events.

  • Security and compliance: Monitoring your Kubernetes cluster can help you identify potential security risks and ensure compliance with regulations and policies. By tracking access logs and other security-related metrics, you can quickly detect and respond to potential security threats.



Using Prometheus for monitoring

Prometheus is an open-source monitoring and alerting system that helps you collect and store metrics about your software systems and infrastructure, and analyze that data to gain insights into their health and performance. It provides a powerful query language, a flexible data model, and a range of integrations with other tools and systems. With Prometheus, you can easily monitor metrics such as CPU usage, memory usage, network traffic, and application-specific metrics, and use that data to troubleshoot issues, optimize performance, and create alerts to notify you when things go wrong.



Why Prometheus over other monitoring tools ?

Prometheus is a popular choice for Kubernetes monitoring for several reasons:

  • Open-source: Prometheus is an open-source project that is free to use and has a large community of contributors. This means that you can benefit from ongoing development, bug fixes, and feature enhancements without paying for a commercial monitoring solution.

  • Native Kubernetes support: Prometheus is designed to work seamlessly with Kubernetes, making it easy to deploy and integrate with your Kubernetes environment. It provides pre-configured Kubernetes dashboards and supports auto-discovery of Kubernetes services and pods.

  • Powerful query language: Prometheus provides a powerful query language that allows you to easily retrieve and analyze metrics data. This allows you to create custom dashboards and alerts, and to troubleshoot issues more easily.

  • Scalability: Prometheus is designed to be highly scalable, allowing you to monitor large and complex Kubernetes environments with ease. It supports multi-node architectures and can handle large volumes of data without significant performance degradation.

  • Integrations: Prometheus integrates with a wide range of other tools and systems, including Grafana for visualization, Alertmanager for alerting, and Kubernetes API server for metadata discovery.



Prometheus Architecture



Alt text



What is Grafana ?

Grafana is a popular open-source data visualization and analytics platform that allows you to create custom dashboards and visualizations based on a variety of data sources. Grafana is often used for monitoring and analyzing metrics and logs in real-time, making it an ideal tool for monitoring systems and applications, including Kubernetes environments.

Grafana supports a wide range of data sources, including databases, time-series databases, and other data storage systems. It provides a powerful query language that allows you to retrieve and analyze data from these sources, and to create custom dashboards and alerts based on that data.

In addition to its powerful data visualization and analysis capabilities, Grafana is also highly extensible. It supports a wide range of plugins and integrations, including integrations with popular monitoring and logging tools like Prometheus, Elasticsearch, and InfluxDB.

More Repositories

1

aws-devops-zero-to-hero

AWS zero to hero repo for devops engineers to learn AWS in 30 Days. This repo includes projects, presentations, interview questions and real time examples.
Python
4,817
star
2

Jenkins-Zero-To-Hero

Install Jenkins, configure Docker as slave, set up cicd, deploy applications to k8s using Argo CD in GitOps way.
Python
4,623
star
3

Docker-Zero-to-Hero

Repo to learn Docker with examples. Contributions are most welcome.
2,436
star
4

python-for-devops

Learn Python from DevOps Engineer point of you.
Python
1,786
star
5

Azure-zero-to-hero

Repository to learn Azure from Zero. This repository covers the complete Azure fundamentals required for a DevOps Engineer.
HCL
1,646
star
6

terraform-zero-to-hero

Master Terraform in 7 days using this Zero to Hero course.
HCL
1,581
star
7

Kubernetes-Zero-to-Hero

Creating this repo with an intent to make Kubernetes easy for begineers. This is a work-in-progress repo.
1,028
star
8

GitHub-Actions-Zero-to-Hero

Repository to kick start your journey with GitHub Actions
Python
777
star
9

shell-scripting-projects

Projects on shell scripting. Goal is to simulate real time projects as much as posible.
Shell
591
star
10

devops-interview-preparation-guide

Share your interview questions and help others. Let's build this interview preparation guide together.
446
star
11

cicd-end-to-end

Using this repo for an End to End CICD Demo
Python
337
star
12

write_your_first_terraform_project

helps you learn terraform and write your first project
HCL
320
star
13

devops-project-ideas

Real-time project ideas for devops engineers.
216
star
14

Golang-Zero-to-Hero

Learn golang with practical approach. TODO repo - work in progress
183
star
15

k8s-kyverno-argocd

Demo repository to enforce automated k8s cluster security using kyverno policy generator and argocd
145
star
16

sandbox

Just a sandbox
105
star
17

k8s-crossplane-argocd

Demonstrate GitOpsification of Cloud Infrastructure using Crossplane and Argo CD
98
star
18

argocd-hub-spoke-demo

Deploy resources to multiple kubernetes clusters using Argo CD.
96
star
19

design_diagrams

flowcharts, workflows and diagrams
83
star
20

cicd-demo-golang

Sample golang application to demonstrate CICD
Go
66
star
21

cis-istio-integration

Integration of F5 CIS Ingress Controller with Istio Service Mesh for Kubernetes and Openshift
Makefile
63
star
22

terraform-eks

A sample repository to create EKS with VPC on AWS using Terraform.
HCL
50
star
23

argo-perf-test

Repo for testing Argo CD Performance(This can be very vague)
46
star
24

officeassistant

Office Management Assistant During Covid19
JavaScript
31
star
25

cicd-demo-manifests-repo

Repo for CICD demo app kubernetes manifests
9
star
26

abhishek-shell-example-project

Shell scripting example project
7
star
27

AWS

AWS Lambda functions for Cloud-admins
Python
3
star
28

demo-repo

This repo is created for a demo
2
star
29

keycloak-stuff

Keycloak Installation and Configuration on K8s and OpenShift Container Platforms. Describes on how OpenShiftv4 Idp can be used as broker for openshift-gitops.
Go
1
star