Skip to content

PaulPowershell/Kram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kram - Kubernetes Resource Metrics Printer

Kram is a command-line tool for retrieves resource metrics for Kubernetes namespaces and pods and prints them in a tabular format.

Last Build

Go Build & Release

Prerequisites

Before using this application, ensure you have the following prerequisites:

  • Go installed on your system. (to build)
  • kubectl configured with access to your Kubernetes cluster.

Installation

  1. Clone the repository to your local machine:
git clone https://github.com/VegaCorporoptions/Kram
cd your-repo

Build the Go application:

go build .

Download Kram Executable

You can download the executable for Kram directly from the latest release with its version. This allows you to use Kram without the need to build it yourself. Here are the steps to download the executable for your system:

  1. Visit the Releases page.

Usage

To list metrics for all namespaces, run the application without any arguments:

kram

To list metrics for a specific namespace, provide the namespace name as an argument:

kram <namespace>

Application will display the resource usage and limits for pods within the specified namespace.

Output

The application outputs (kram) the following metrics in a tabular format:

Namespace Pods CPU Usage CPU Request CPU Limit Mem Usage Mem Request Mem Limit
example-namespace 5 100 Mi 200 Mi 300 Mi 500 Mo 600 Mo 700 Mo
another-namespace 3 50 Mi 100 Mi 150 Mi 250 Mo 300 Mo 350 Mo
... ... ... ... ... ... ... ...

The application outputs (kram networking) the following metrics in a tabular format:

Metrics for Namespace: networking

Pods Container CPU Usage CPU Request CPU Limit Mem Usage Mem Request Mem Limit
ingress-nginx-controller-974dcfff4-7hcbv controller 3 Mi 1000 Mi 1000 Mi 142 Mo 512 Mo 1024 Mo
ingress-nginx-controller-974dcfff4-mb5fv controller 3 Mi 1000 Mi 1000 Mi 134 Mo 512 Mo 1024 Mo
... ... ... ... ... ... ... ...

Demo

kram

License

This project is licensed under the MIT License. See the LICENSE file for details.