How to Monitor a Kubernetes Cluster in 2022 with Prometheus & Grafana

Поділитися
Вставка
  • Опубліковано 8 січ 2025

КОМЕНТАРІ • 81

  • @joross8
    @joross8 3 роки тому +11

    As someone who has been working in Kubernetes full time for the last 6 months, this video is a great learning source. Thanks Marcel.

    • @ikhlastitouche8057
      @ikhlastitouche8057 2 роки тому +1

      what does working with Kubernetes full time look like ?

  • @niketsingh87
    @niketsingh87 Рік тому +1

    Thanks a lot Marcel. your video are loaded with useful content. No fillers.

  • @Mano-ii4ng
    @Mano-ii4ng 3 роки тому +6

    As always Big Thanks Marcel. You Sir, are a master at explaining K8s and other stuff.

  • @DamienMalakay
    @DamienMalakay 2 роки тому

    you definitely slowed down from the last time i saw your videos! before i had to change the playback speed but now it's perfect for me lol keep up the good work Marcel

  • @whiteorchid2023
    @whiteorchid2023 3 роки тому +4

    A big thank you, Marcel! 🙏🏻 Your hard work is much appreciated! 🥇

  • @wooja2112
    @wooja2112 3 роки тому +2

    As always, awesome video! Very helpful!

  • @sharathkumar13_
    @sharathkumar13_ 2 роки тому +1

    Wonderful Video. This helps to learn a lot. Your support is awesome.

  • @silentwatcher13
    @silentwatcher13 3 роки тому +13

    Hey marcel, great video, really appreciate your efforts 👍🏼👍🏼, i think you should take this prom setup to next level by creating a detailed video on Thanos and it’s components( humble suggestion). 🙂

  • @zenobikraweznick
    @zenobikraweznick 2 роки тому +2

    Quick, succulent, concise. 10/10 , thank you! 👍

  • @Fayaz-Rehman
    @Fayaz-Rehman 2 роки тому

    Good Better Best - Never Let Them Rest - Thank you.

  • @rupeshegishte
    @rupeshegishte 2 роки тому

    Thank you so much marcel, this is very informative

  • @loicgregoire3058
    @loicgregoire3058 2 роки тому

    This video is pure gold 😀 Thanks a lot

  • @shaheerzaman620
    @shaheerzaman620 2 роки тому +2

    This was fantastic! It would be great if you could do a video on how to integrate Datadog with kubernetes

  • @stefanschmidbauer6075
    @stefanschmidbauer6075 3 роки тому

    Great video. Already looking forward to a follow up.

  • @nadimkaddis7135
    @nadimkaddis7135 Рік тому

    A big thank you it is working .

  • @shinebayar
    @shinebayar 2 роки тому +1

    Kube Prometheus is awesome project. I wish they maintained official Helm chart. Working with vanilla yaml files isn't scalable in the long term.

  • @ryanwendel6115
    @ryanwendel6115 Рік тому +1

    Would be great to see a video on how you are using prometheus, grafana, and alert manager for visualizations and alerting. I am assuming you are customizing the system you generated in this video, to some degree.
    It would also be great to see how you are monitoring workloads. Is it just as simple as creating service monitors?

    • @MarcelDempers
      @MarcelDempers  Рік тому +1

      I only customise verbosity of what metrics are sent out using Prometheus remote write. I dont store metrics in-cluster and send it to a hosted platform, so i dont have to deal with data retention, state and availability.
      Other than that no customisation is needed since all cluster metrics work out the box. Combine this with fluentd for app logs and developers have all they need to monitor. For custom metrics, only service monitors are needed, yes

    • @ryanwendel6115
      @ryanwendel6115 Рік тому

      @@MarcelDempers thanks, man. Forgot to mention this was another great video!

  • @farzadmf
    @farzadmf 3 роки тому

    Another great video, thanks

  • @carlomagno55
    @carlomagno55 2 роки тому

    Muchas gracias por explicar tan claramente tantas cosas indispensables para entender cómo trabajar con estas tecnologías tan nuevas, complejas e impresionantes

  • @tadeubernacchi3360
    @tadeubernacchi3360 Рік тому

    Nice video. What if I don't want to use port-forwarding? What are my options?

  • @antoniorodrigo310
    @antoniorodrigo310 Рік тому

    Hello everyone! Do any of you know if it's possible to run all these pods on the worker nodes?
    Thanks in advance

  • @ThesGt
    @ThesGt 2 роки тому +1

    besides blackbox exporter is there an exporter that we can use to get the performance of the applications? im used to Dynatrace and NewRelic APMs to get latency of functions being called but im not sure what to use to get this data inside the containers apps

    • @MarcelDempers
      @MarcelDempers  2 роки тому

      It's a little more complex than dropping NewRelic in there and it's a different type of architecture. Take a look at Jaeger Tracing.
      ua-cam.com/video/idDu_jXqf4E/v-deo.html

  • @kanakorn.h
    @kanakorn.h Рік тому

    Great, but how to I use Prometheus to monitor the servers outside the K8S cluster?

  • @andrewfigaroa7031
    @andrewfigaroa7031 2 роки тому

    Thanks Marcel, this video helped to get prometheus installed. But now how do I monitor my custom apps in their namespaces? I would like to start with just a basic scraping.

  • @nforlife
    @nforlife 3 роки тому

    Great video keep it up

  • @gunjanlahoti7694
    @gunjanlahoti7694 2 роки тому

    Hey , love the way you explain . Just wanted to check are there any plans to create a video on Node problem detector setup and usage?

  • @skchang2239
    @skchang2239 2 роки тому +1

    really helpful! Save me from tons of docs

  • @helders
    @helders Рік тому

    What do you consider to be the most useful/important metrics to be monitored in a K8s cluster?

  • @sticksen
    @sticksen Рік тому

    Hey, what do you think of using the annotations on a Pod/Service/Deployment etc to tell Prometheus where and if it should scrape? Any downsides to this over the ServiceMonitors?

  • @madrum
    @madrum 3 роки тому +1

    What, if anything, are other viewers using to store data collected by Prometheus? TIA

  • @pindajatt730
    @pindajatt730 2 роки тому +1

    Hey Marcel, I followed this guide to run prometheus & grafana in k3s with an ingress instead of port-forward and I did not have to do the datasources fix, it just works. Not sure if they have fixed it or because I'm running it in k3s.

  • @bensiewert5286
    @bensiewert5286 Рік тому

    When I try to do the port forwarding part, it just times out. Not sure why. It is a remote cluster on digital ocean.

  • @nitishpriyadarshi2591
    @nitishpriyadarshi2591 3 роки тому

    could you please tell the promql expression to monitor POD cpu and memory utilization.

  • @halobolah3240
    @halobolah3240 3 роки тому

    great video, THX !!! :)

  • @georgelza
    @georgelza 2 роки тому

    ... 2nd ask... how do I add new targets... aka labels to scrape ? someone I missed this.

  • @georgelza
    @georgelza 2 роки тому

    hi hi, I deployed the 0.9 version ... my EKS cluster is still 1.21... so it seems the data source problem does not exist... ;) but now neither does any of the dashboards... any ideas? do yo maybe have a video that goes after this, that addresses how to add more selectors... trying to instrument a Python Flask app deployed on EKS. thanks

  • @shubhamkanwal8977
    @shubhamkanwal8977 2 роки тому

    Great video! One question , does these manifests needs to be deployed on same namespace as our kubernetes cluster, if not then how does it know to look into namespace into which kubernetes resources are?

  • @lalchandrajak
    @lalchandrajak 2 роки тому

    Hey, Need one help where I can configure my slack channel to shoot alert messages and how I can bind port permanently.

  • @xuantuongvu2020
    @xuantuongvu2020 3 роки тому

    I wonder that Which one in the monitor shows it can get the network metrics ? Cpu and ram is normal but how about the network ? How this monitor operator get the network metric?

  • @venkataramanareddy7735
    @venkataramanareddy7735 2 роки тому

    can you pls add one session on Grafana alerts for kubernetes

  • @JackReacher1
    @JackReacher1 2 роки тому

    17:10 Is Loki also a solution for persistent log writing?

    • @MarcelDempers
      @MarcelDempers  2 роки тому +1

      You can persist data in prometheus by using a persistent volume, you can also persist data in Grafana I believe (have not looked into it)
      Grafana Loki can definitely persist data too

    • @JackReacher1
      @JackReacher1 2 роки тому

      @@MarcelDempers I am learning Loki next.
      Can you make videos on how a python application can be monitored using Prometheus + Grafana + Loki?

  • @KaykeTeixeira
    @KaykeTeixeira 2 роки тому

    Hey Marcel, thanks for the video!! With this solution on your source code i can visualize latency of the nodes on grafana?

  • @FreeAmericaFromAIPAC
    @FreeAmericaFromAIPAC 2 роки тому

    why not use the helm chart for prometheus?

  • @helders
    @helders Рік тому

    My prometheus pods are using increasingly more RAM up to the point it kills OOMKilled and stop monitoring until i restart the pods, is there any way to minimize this? I was wondering if i add some persistency to the deployment it would do any good

    • @MarcelDempers
      @MarcelDempers  Рік тому +1

      As far as i know by default, Prometheus is an in-memory database and persistence is only to write data to disk to prevent loss during restarts
      You may need to research config options if its possible to offload some data to disk to reduce memory usage.
      Alternatively you can shard by running more Prometheus instances (one per namespace etc) to reduce it too

  • @hereforyouwhat
    @hereforyouwhat 2 роки тому

    Hi Marcel
    What is difference Prom+Grafana vs Kubernetes Dashboard if we want to monitor k8s cluster?
    Or in which scenarios Prom+Grafana should be used over Kubernetes Dashboard

    • @MarcelDempers
      @MarcelDempers  2 роки тому

      The kubernetes dashboard mainly relies on basic API metrics used by HPA for example. They are highly aggregated and limited, I.E memory+cpu only.
      Prometheus solution provides way more in depth telemetry via kube-state-metrics

  • @georgelza
    @georgelza 2 роки тому

    Love the video... making me think of changing my setup, this looks so much more stitched together...
    Any chance you can do a similar video, but where the Prometheus and Grafana is off the K8S cluster, imagine a environment with multiple K8S clusters, where Prometheus and Grafana is #1 on a dedicated cluster or where #2 Prometheus & Grafana are on a dedicated EC2 hosts.
    PS: you did not mention where the prometheus.yaml file is stored to inform Prom about off cluster targets.

    • @MarcelDempers
      @MarcelDempers  2 роки тому

      You'll need to run a prometheus instance in every cluster for the service monitors to work, and use remote-write to push telemetry out to your central EC2 Prometheus.

    • @georgelza
      @georgelza 2 роки тому

      @@MarcelDempers hi hi, was starting to think the same, was actually thinking Thanos might be a good way of pulling it together onto a central Prometheus/Grafana stack.
      With EKS and multiple AZ's the persistent storage etc of course becomes a much more interesting discussion,
      I got one cluster, spanning 3 subnets, A-App, B-Database, C-Management, and these are then spread over the 3 AZ's. so for the prometheus we want to pin them to Management in A, Management in B, and so on...

    • @farrukhbekshamsutdinov9022
      @farrukhbekshamsutdinov9022 Рік тому

      @@MarcelDempers hi, can you share your experience on how to configure remote-write in prometheus inside k8s cluster and get metircs on another central prometheus?

  • @shaikahamadulla5623
    @shaikahamadulla5623 2 роки тому

    Can you share your system configuration of your demo machine. For smooth experience of trying and learning your lessons 🙂

    • @MarcelDempers
      @MarcelDempers  2 роки тому +2

      Nothing fancy, I have an Intel i9 CPU, any i7 would do.
      Memory is key, especially running bunch of containers, virtual machines and k8s clusters locally.
      I have 32GB which is more than enough.
      And SSD, i have a 1TB Samsung SSD (one of those tiny PCI-exp ones😁 )

  • @YouTubers-rj9xv
    @YouTubers-rj9xv 3 роки тому +1

    Hey bro why don't you show grafana dashboard

  • @benhesketh6995
    @benhesketh6995 2 роки тому

    What's your approach for Windows nodes?

    • @MarcelDempers
      @MarcelDempers  2 роки тому +1

      I've dug into this before and Windows is a little tricky at the moment since the kubelet and kube-state-metrics do not provide similar metrics as linux pods. I.E they dont export the same metrics.
      However - metrics-server (used by autoscalers) does get CPU and memory stats for Windows pods. You can use metrics-server and look on github for a project called metric-server-exporter to export pod cpu and memory. Add a service monitor for that and you can make a custom dashboard for it.
      That should give you observability into windows workloads for now until better support lands

  • @kalapanirdip
    @kalapanirdip 2 роки тому

    thank you

  • @gab796
    @gab796 2 роки тому

    a very newbie question: Kubernetes still suports Docker after all?

    • @MarcelDempers
      @MarcelDempers  2 роки тому +1

      Kubernetes still supports docker images.
      The deprecation is about the runtime on the kubelet. Kubernetes will use containerd going forward as a runtime for containers and will not use docker as a runtime.
      Docker images are still a standard supported by containerd, so your pods will and can still use docker images.
      kubernetes.io/blog/2020/12/02/dockershim-faq/

    • @gab796
      @gab796 2 роки тому

      @@MarcelDempers Thanks!!

  • @musclecode
    @musclecode 3 роки тому

    Why did you do just create and not server-side apply ?

    • @MarcelDempers
      @MarcelDempers  3 роки тому +6

      interesting! i just noticed that. Need to learn what it means. (never used server-side apply) Thanks for pointing it out. Learning something new every day

  • @PePTo-dx2yj
    @PePTo-dx2yj Рік тому

    Devops)) need help grafana show no DATA for PODs(cpu network, ram) physical servers monitorungs fine.... where can be problem?

    • @MarcelDempers
      @MarcelDempers  Рік тому

      make sure your helm chart you are using matches the compatibility matrix and your cluster version

    • @PePTo-dx2yj
      @PePTo-dx2yj Рік тому

      @@MarcelDempers ty for answer, seem to me my problemm more deeper)) 1. Install from kuberspray 2. k8s 1.24 3. (major cause) CRI wcih I m using in my cluster is a DOCKER, I think DOCKER major cause, ty again

  • @robl39
    @robl39 Рік тому

    Please show us how to monitor ephemeral and short lived jobs with push gateway!

  • @amjds1341
    @amjds1341 2 роки тому

    Do you hv any udemy course ?

  • @amazinggameplays2275
    @amazinggameplays2275 2 роки тому

    Good content.
    1 suggestion to put camera infront of you, so don't need to record at such weird angle.

  • @wagfeliz
    @wagfeliz 2 роки тому

    An comment about the ¨bug" on the datasource, its because of those stupid Network Policies they put in the manifests, I particularly just remove it all, so you also will not have problems exporting grafana to a load balancer.

  • @parthtrivedi318
    @parthtrivedi318 3 роки тому +1

    Can devops engineer earns 150k per year after 3 years of experience?

    • @whiteorchid2023
      @whiteorchid2023 3 роки тому +1

      Anything it's possible! Just search for a new job 🥳🥳🥳

    • @parthtrivedi318
      @parthtrivedi318 3 роки тому

      @@whiteorchid2023 Thanks sir