Management of Kubernetes/OpenShift Clusters Ulrike Klusik, - - PowerPoint PPT Presentation

management of
SMART_READER_LITE
LIVE PREVIEW

Management of Kubernetes/OpenShift Clusters Ulrike Klusik, - - PowerPoint PPT Presentation

Metric Storage for Capacity Management of Kubernetes/OpenShift Clusters Ulrike Klusik, https://www.consol.de PromCon Europe 2019-11-08 Motivation Capacity Management needs aggregated node capacity, quota and resource usage metrics for


slide-1
SLIDE 1

Metric Storage for Capacity Management of Kubernetes/OpenShift Clusters

Ulrike Klusik, https://www.consol.de

PromCon Europe 2019-11-08

slide-2
SLIDE 2

ConSol 2

Motivation

  • Capacity Management needs aggregated node capacity, quota and resource usage metrics

for several month and years.

  • Prometheus has only one retention for all metrics
  • Conflict:
  • Detailed metrics for post mortem analysis (days or upto a month)
  • Highly aggregated data for capacity management. E.g. one value of CPU Quota per per

cluster and application_type (infrastructure vs. application) Metrics wanted for years.

  • Prometheus Remote write feature: selected metrics can be stored in an external time

series database with longer retention policies.

  • Thanos (https://thanos.io/) provides a remote write target and PromQL interface
slide-3
SLIDE 3

ConSol 3 namespace Nodes

host

NODE- EXPORTER

central storage and visualization

Thanos Receiver Thanos Store Container Thanos container Grafana

Metric Collection and Storage Architecture

Kubelet + cAdvisor Thanos Compactor api-servers

Project prometheus-infra-mon

PROMETHEUS KSM/OSM

Kubernetes/OpenShift Cluster

  • KSM (Kube state metrics)/

OSM (OpenShift state metrics): for running Pods per Namespace, ResourceQuotas and ClusterResourceQuotas

  • Node-Exporter for operating

system metrics of resource usage

Kubernetes metric target Minio S3 bucket Thanos Query PromQL TSDB

slide-4
SLIDE 4

ConSol 4

Dashboard: Capacity Management Overview

slide-5
SLIDE 5

ConSol 5

Computing Effective Quotas per Namespace

  • record: namespace:kube_resourcequota:effective

expr: min by(namespace,namespace_type,resource_base,type) (label_replace({__name__=~"^(kube_resourcequota)$",namespace=~".+", resource=~"(requests.)?(memory|cpu)",resource!~"limit.*",type="hard"},"resource_base","requests.$2", "resource","(requests.)?(.+)"))

  • record: namespace:kube_resourcequota:effective

expr: max by(namespace,namespace_type,resource_base,type) (label_replace({__name__=~"^(kube_resourcequota)$",namespace=~".+", resource=~"(requests.)?(memory|cpu)",resource!~"limit.*",type="used"},"resource_base","requests.$2", "resource","(requests.)?(.+)")) …

  • record: namespace:kube_resourcequota:effective

expr: min by(namespace,namespace_type,resource_base,type) (label_replace({__name__=~"^(kube_resourcequota)$",namespace=~".+",resource=~"limits.+",type="hard"} ,"resource_base","$1","resource","(.+)"))

  • record: namespace:kube_resourcequota:effective

expr: max by(namespace,namespace_type,resource_base,type) (label_replace({__name__=~"^(kube_resourcequota)$",namespace=~".+",resource=~"limits.+",type="used"} ,"resource_base","$1","resource","(.+)"))

slide-6
SLIDE 6

Thank you!

slide-7
SLIDE 7

ConSol Consulting & Solutions Software GmbH St.-Cajetan-Straße 43 D-81669 München Tel.: +49-89-45841-100 info@consol.de www.consol.de Twitter: @consol_de