Project 5: Setup Monitoring and Alerting on Kubernetes | Prometheus and Grafana Tutorial

Поділитися
Вставка
  • Опубліковано 19 вер 2024
  • Setup Monitoring and Alerting on Kubernetes | Prometheus and Grafana Tutorial
    🚀 Welcome to the week 5 video of #10weeksofcloudops. We will implement robust monitoring and alerting on your Kubernetes cluster using Prometheus and Grafana, making it easy to keep a close eye on your applications.
    🔥 In this comprehensive Prometheus and Grafana tutorial, we cover the following key topics:
    - Setting Up a Kubernetes Cluster: We'll start from the ground up, guiding you through setting up a Kubernetes cluster for your applications.
    - Helm Installation: Learn how to install Helm, the Kubernetes package manager, simplifying application deployment.
    - Deploying Prometheus and AlertManager with Helm: Discover how to deploy Prometheus and AlertManager using Helm charts, allowing you to collect metrics and manage alerts effectively.
    - Deploying Grafana: Learn how to deploy Grafana, a versatile dashboard and visualization tool, and integrate it with Prometheus for comprehensive monitoring.
    - Deploying a Sample Application: We'll deploy a sample application to your Kubernetes cluster, demonstrating how monitoring and alerting work in a real-world scenario.
    Setting Up Alerts with AlertManager and Slack Integration: Get a step-by-step guide on how to set up and customize alerts using AlertManager and integrate it with Slack for real-time notifications.
    Creating a Grafana Dashboard: We'll walk you through creating a customized Grafana dashboard, providing a visually rich overview of your Kubernetes cluster's performance and health.
    📈 By the end of this tutorial, you'll have a complete monitoring system for your Kubernetes environment, ensuring that you can proactively detect issues, troubleshoot problems, and keep your applications running smoothly.
    👨‍💻 Whether you're a beginner or an experienced DevOps professional, this video will equip you with the knowledge and skills to implement continuous monitoring, logging, and alerting in your Kubernetes projects.
    🚀 Let's dive into this "Setup Monitoring and Alerting on Kubernetes | Prometheus and Grafana Tutorial" and empower your journey with robust monitoring and alerting capabilities!
    📌By the end of this video, you will learn the following:
    * Setup a Kubernetes cluster
    * Helm installation
    * Install Opensource Prometheus and AlertManager using Helm
    * Install Grafana using Helm
    * Deploy a sample application to the cluster
    * Setup alerts using AlertManager and Slack
    * Setup Grafana dashboard
    ✅Commands used in the video:
    github.com/piy...
    🔥The blog referred to in the video:
    devo.hashnode....
    𝗖𝗢𝗠𝗣𝗟𝗘𝗧𝗘 𝗧𝗨𝗧𝗢𝗥𝗜𝗔𝗟 𝗦𝗘𝗥𝗜𝗘𝗦 👌 It’s 🅵🆁🅴🅴 ⛳
    #Azure900WithPiyush
    • AZ900WithPiyush - Azur...
    Namaste Google Cloud | GCP Tutorial for beginners, a complete playlist for Associate Cloud Engineer Certification Exam:
    • Namaste Google Cloud, ...
    DevOps Tutorial for Beginners
    • DevOps Tutorial for be...
    AWS tutorial for beginners
    • AWS (Amazon Web Servic...
    Azure Data fundamentals DP 900 full course
    • Microsoft Azure Data F...
    Jenkins Tutorial for Beginners
    • Jenkins Tutorial For B...
    DevOps and Cloud Podcasts:
    • DevOps and Cloud Podcasts
    -----------------------------------------------------------------------------------------------------------------------
    Connect me Here:👇👇
    🔥UA-cam ▶ / techtutorialswithpiyush
    ⛳LinkedIn ▶ / piyush-sachdeva
    🚀Instagram ▶ / techtutorialswithpiyush
    🌍Twitter ▶ / techie_piyush
    👨‍💻 Github ▶ github.com/piy...
    ✍ Medium.com ▶ / piyush.sachdeva055
    📚 dev.to: ▶ dev.to/piyushs...
    ✨Discord ▶ / discord
    -----------------------------------------------------------------------------------------------------------------------
    Join our learning communities 👋
    / discord
    References 📚:
    #devops #techtutorialswithpiyush
    prometheus and alertmanager
    Setup Monitoring and Alerting on Kubernetes
    Prometheus and Grafana Tutorial
    how to setup a kubernetes cluster
    Deploying Prometheus and AlertManager with Helm
    install prometheus and grafana on kubernetes
    install prometheus and grafana using helm
    prometheus and grafana monitoring
    prometheus and alertmanager
    prometheus alertmanager tutorial
    kubernetes
    devops
    prometheus
    grafana
    prometheus tutorial

КОМЕНТАРІ • 44

  • @awssoorinje747
    @awssoorinje747 10 місяців тому +2

    Sir, Thank you once again for your invaluable assistance. The session was extremely beneficial. It would have been even more advantageous to see the lab executed in an AWS environment

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  10 місяців тому

      Hello Buddy, Thank you for your support and feedback. As mentioned in the video, I have used all the opensource tools and their implementation is standard across the cloud platform.You can use the same steps to implement this project in Azure or AWS as well. Let me know if you are facing any issues, happy to help :)

  • @ervispojana118
    @ervispojana118 4 місяці тому +1

    Great Work --- It would be great to have a PLATFORM-OPS course. With tools like : Kubernetes, ELK, Prometheus Grafana, Troubleshooting, AWS, Splunk, Dynatrace.

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  4 місяці тому

      Thank you for the suggestions. Currently I am working on the CKA series which will have 40+ videos, once I am done with that, I will try to create more videos on the topics you have suggested. Thank you once again.

  • @debillion
    @debillion 2 місяці тому +1

    I like the way you teach. Do you have a full course on prometheus and Grafana?

  • @sudheersen8227
    @sudheersen8227 6 місяців тому +2

    continue sir❤❤

  • @awssoorinje747
    @awssoorinje747 9 місяців тому +1

    Dear Sir, Thanks a lot, next video please.

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  8 місяців тому

      I am currently focusing on Azure DevOps series, will resume this one once I complet ethe Azure DevOps one.

  • @olympusbiz9583
    @olympusbiz9583 8 місяців тому +3

    20:00 slack integration

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  8 місяців тому

      Thank you for sharing this

    • @olympusbiz9583
      @olympusbiz9583 8 місяців тому +1

      I've installed kube-prometheus-stack, it's successfully settled.
      Now I want to create alerts, do I need to configure my slack details in values.yaml file or else.

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  8 місяців тому

      You need to follow the below steps:
      kubectl create secret generic alertmanager-slack-webhook --from-literal webhookURL=SLACK_WEBHOOK_URL
      kubectl apply -f extras/prometheus/oss/alertmanagerconfig.yaml

    • @olympusbiz9583
      @olympusbiz9583 8 місяців тому

      Okay great, can you let me know please how can I add and remove alerts from the chart.

  • @dr.hemantchauhan2613
    @dr.hemantchauhan2613 10 місяців тому +1

    Excellent 🎉

  • @DevOpsGuru814
    @DevOpsGuru814 2 місяці тому +1

    Hi Piyush,
    I would like to know does the same works on EKS since you are gcp. Any reason why did you try the chart from bitnami not from official grafana repo i mean prometheus stack repo.
    It would be much appreciated if you add the video for enabling loki also on same cluster and get the log on grafana

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  2 місяці тому

      Hello, The manifest that we use, its built for Kubernetes that means any kubernetes cluster running anywhere could be cloud GKE/AKS/EKS or on-premises. The application code could have some dependency issues but other than, manifests are standard and follow the same pattern. I'd add the loki integration to my todo list, will do it soon.

  • @shm8296
    @shm8296 8 місяців тому +1

    can we use this method in production or in the company, any vulnerability issues will face in future ?

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  8 місяців тому

      Many enterprises uses managed version of Prometheus and Grafana so that they do not have to worry about security patching, upgrades, server maintenance and other administrative task. Google also has a managed offering called GMP ( Google Managed Prometheus). I hope that answered your question

  • @JITHUR-h8r
    @JITHUR-h8r 6 місяців тому +1

    Hi, I have managed prometheus in my production env , how to add this prometheus as datasource in grafana

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  6 місяців тому

      Hello, which cloud are you using? Adding the datasource is same for opensource and managed prometheus. Here's the Grafana installation guide: cloud.google.com/stackdriver/docs/managed-prometheus/query#grafana-deploy

  • @QuangPham-bc7lc
    @QuangPham-bc7lc 9 місяців тому +1

    can i ask why the number of nodes is 4.78 but not 4 or 5 or any natural number?

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  8 місяців тому

      Hello, Can you provide some context? Was it there in the video? Can you pinpoint the timestamp?

  • @Nikhil-go6dq
    @Nikhil-go6dq Місяць тому

    Can I setup prometheus on my GCP VM to monitor GKE cluster or we need to setup prometheus in cluster only?

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  Місяць тому

      If you setup in the cluster itself it be a better choice. If you do that in a VM, then it will be a single point of failure, if the instance goes down the prometheus will go down with it, issues with scaling and everything. Then you have to use an autoscaling group(in AWS) or MIG(in GCP) or VMSS(in Azure), it will be a costly and complex solution. That is why Kubernetes will be the right choice if you already have apps runnning on kubernetes.

  • @prasannakumar2633
    @prasannakumar2633 9 місяців тому +1

    Thankyou

  • @fikreteren7783
    @fikreteren7783 5 місяців тому +1

    Is GKE Autopilot still restricted or is it possible to see the data?

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  5 місяців тому

      Hey, What type of data are we talking about? you mean Node details?
      If we are using Kubernetes on our On premises server we get access to everything and we manage everything on our own including control plane., worker nodes, workloads etc.
      If you dont want to manage the control plane ourself, we use a managed Kubernetes service such as GKE standard which will give us access to our worker nodes and workloads however, if you dont want to manage your worker nodes, you use GKE Autopilot in which you can focus on your workload and control plane + worker nodes are managed by GKE. I hope this answered your question.

  • @techienitish407
    @techienitish407 10 місяців тому +1

    hi piyush pls give the link of hashnode for EKS tutorial..... thanks

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  10 місяців тому

      Thank you for reminding me, just added the link in the description. Here as well
      devo.hashnode.dev/comprehensive-aws-eks-cluster-monitoring-with-prometheus-grafanaand-efk-stack-10weeksofcloudops

  • @39vignesh.m35
    @39vignesh.m35 6 місяців тому +1

    how to alert mail instead of webhook

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  6 місяців тому

      You need to add smtp details in alert manager yaml instead of webhook

    • @39vignesh.m35
      @39vignesh.m35 6 місяців тому +1

      @@TechTutorialswithPiyush tnx

    • @39vignesh.m35
      @39vignesh.m35 6 місяців тому

      sir can i use servicemonitor instead of probe for monitor endpoint

  • @ravireddy270
    @ravireddy270 3 місяці тому

    Hi piyush I just completed all the tutorials regarding Azure Devops, and through udemy I completed all the courses regarding kuberntes too..I can able to clear interview but during the client round I faced a question about how many kuberntes clusters you are using in your current project.. Please provide a rough answer to these for future reference.

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  2 місяці тому

      Hello Ravi, Thank you for reaching out. The number of kubernetes cluster you use is dependent on the number of projects you are handling and number of environments you have access to.
      For example, if you are an ops person, you would have the access to all the non-dev clusters. UAT, Prod, Pre-prod etc
      If you are a developer, you would only have access to the dev clusters.
      You can form your answer accordingly.

    • @ravireddy270
      @ravireddy270 2 місяці тому

      @@TechTutorialswithPiyush yeah Piyush...I don't have experience with kuberntes in real time, can I answer it as 4 clusters regarding the Dev environment.

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  2 місяці тому

      @@ravireddy270 your call, but prepare your next answer, why 4 clusters for dev?

  • @DevNnamsi
    @DevNnamsi 9 місяців тому

    Please how can we connect I love you videos and would love a paid course if any

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  9 місяців тому +1

      I dont do paid training but you can reach out to me over Discord or Linkedin for any guidance,

    • @DevNnamsi
      @DevNnamsi 9 місяців тому

      @@TechTutorialswithPiyush Alright sending you a message soon