Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Setting up Monitoring for Kubernetes

Setting up Monitoring for Kubernetes

Lightning talk given at Kubernetes + CNCF meetup in Bengaluru on 16th September

Meetup link - https://www.meetup.com/kubernetes-india-meetup/events/295710022/

I talked about a story on reducing the number of metrics with cAdvisor, which is not possible with the out-of-the-box helm chart.

Related blog posts -

Prometheus Operator Guide

Kubernetes Monitoring with Prometheus and Grafana

How to restart Kubernetes Pods with kubectl

Read more of my writing at https://last9.io/blog/authors/prathamesh

Prathamesh Sonpatki

September 17, 2023
Tweet

More Decks by Prathamesh Sonpatki

Other Decks in Technology

Transcript

  1. 2

  2. Monitoring is crucial - Prometheus is King of Kubernetes Monitoring

    🔥 - Kube-Prometheus-Stack - Container level monitoring via cAdvisor - Cluster level monitoring via Kube State Metrics 3
  3. cAdvisor - https://github.com/google/cadvisor - Analyzes resource usage and performance of

    running containers - Metrics for specific hardware and software components such as disk, CPU, memory, network, process, TCP, and much more. 5
  4. But wait… - 91K samples per minute 😥 😨 -

    21 nodes, 600 pods, 125 containers - ~ 4B per month only for cAdvisor metrics - 80% of metrics are unused! 10
  5. Let’s take an action - We don’t need all of

    the - Accelerator - Disk - diskIO - Network - .. - TCP - … - Let’s disable these metrics with `/-disable_metrics` 12
  6. But wait… - We don’t need all of the -

    Accelerator - Disk - diskIO - Network - .. - TCP - … - Let’s disable these metrics with `/-disable_metrics` 13
  7. Alternate Strategy - 65% of savings in samples collected! 16

    https://github.com/ckotzbauer/helm-charts/tree/main/charts/cadvisor