klusterview

command module
v0.0.0-...-15bd12c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2022 License: BSD-2-Clause Imports: 4 Imported by: 0

README

Klusterview

Klusterview scans Kubernetes cluster to visualize resources & utilization

Compiling

go build .

Running

  • First have Redis with Time Series module enabled, e.g: docker run -d --name redis -p 6379:6379 redis/redis-stack

  • Run a sample: ./klusterview This will populate Redis with the sample data.

  • Run Webdis to expose Redis on HTTP port (7379).

  • Run simple web server on localhost (e.g: php -S 0.0.0.0:8000) and browse there.

Data Model

Hybrid data model - Basic Redis data types + Time Series keys

Keys:

  • samples - total samples count in db (int)
  • sample:i - timestamp of beginning of cluster scan (int)
  • sample:i:nodes - node names existing at time of scan (set)
  • sample:i:pods - pod names existing at time of scan (set)
  • node:node_name:alloc_cpu - allocatable cpu for specific node (int)
  • node:node_name:alloc_mem - allocatable memory for specific node (int)
  • node:node_name:util_cpu - utilization of cpu (Time Series)
  • node:node_name:util_mem - utilization of memory (Time Series)
  • pod:pod_name - pod meta data (dictionary)
  • pod:pod_name:containers - containers (set)
  • pod:pod_name:container_name:req_cpu - requested cpu (int)
  • pod:pod_name:container_name:req_mem - requested memory (int)
  • pod:pod_name:container_name:util_cpu - utilization of cpu (Time Series)
  • pod:pod_name:container_name:util_mem - utilization of memory (Time Series)

Pipeline Stages

  • Scan - Scan cluster Nodes & Pods to extract resource requests & utilization
  • Ingest - Write data to Redis

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL