Skip to content

Commit

Permalink
added docs related to requested resources accouting
Browse files Browse the repository at this point in the history
  • Loading branch information
rchakode committed Jun 26, 2022
1 parent 6c397b5 commit 2d88c86
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 20 deletions.
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,35 @@
- [Design Fundamentals](#design-fundamentals)
- [License](#license)
- [Support & Contributions](#support--contributions)

# Overview
`kube-opex-analytics` (literally *Kubernetes Opex Analytics*) is a Kubernetes usage accounting and analytics tool to help organizations track the resources being consumed by their Kubernetes clusters over time (hourly, daily, monthly). The purpose of `kube-opex-analytics` is to help prevent overpaying. Indeed, it provides insightful usage analytics metrics and charts, that engineering and financial teams can use as key indicators to take appropriate cost optimization decisions.

Key features:

* **Usage accounting and trends per namespace.** This allows assessing what capacities each namespace is consuming over various period of time (hourly, daily, monthly).
* **Accounting of non-allocatable capacities.** At node and cluster levels, `kube-opex-analytics` tracks and consolidates the share of non-allocatable capacities and highlights them against usable capacities (i.e. capacities used by actual application workloads). In contrary to usable capacities, non-allocatable capacities are dedicated to Kubernetes operations (OS, kubelets, etc).
* **Cluster usage accounting and capacity planning.** This feature makes it easy to account and visualize capacities consumed on a cluster, globally, instantly and over time.
* **Usage/requests efficiency.** Based on hourly-consolidated trends, this functionality helps know how efficient resource requests set on Kubernetes workloads are, compared against the actual resource usage over time.
* **Cost allocation and charge back analytics:** automatic processing and visualization of resource usage accounting per namespace on daily and monthly periods.
* **Insightful and extensible visualization.** `kube-opex-analytics` enables built-in analytics dashboards, as well as a native Prometheus exporter that exposes its analytics metrics for third-party visualization tools like Grafana.
* **Consumption hourly trends, daily and monthly accounting per namespace.** This feature provides analytics metrics _tracking both actual usage and requested capacities_ over time. Metrics are namespaced-based, collected every 5 minutes, consolidated on a hourly basis for trends, from which daily and monthly accounting is processed.
* **Accounting of non-allocatable capacities.** At node and cluster levels, `kube-opex-analytics` tracks and consolidates the share of non-allocatable capacities and highlights them against usable capacities (i.e. capacities used by actual application workloads). In contrary to usable capacities, non-allocatable capacities are dedicated to Kubernetes operations (OS, kubelets, etc).
* **Cluster usage accounting and capacity planning.** This feature makes it easy to account and visualize capacities consumed on a cluster, globally, instantly and over time.
* **Usage/requests efficiency.** Based on hourly-consolidated trends, this functionality helps know how efficient resource requests set on Kubernetes workloads are, compared against the actual resource usage over time.
* **Cost allocation and charge back analytics:** automatic processing and visualization of resource usage accounting per namespace on daily and monthly periods.
* **Insightful and extensible visualization.** `kube-opex-analytics` enables built-in analytics dashboards, as well as a native Prometheus exporter that exposes its analytics metrics for third-party visualization tools like Grafana.


![kube-opex-analytics-overview](screenshots/kube-opex-analytics-demo.gif)

Read the [design fundamentals](./docs/design-fundamentals.md) documentation to learn more concepts and implementation decisions.

# Getting Started
* [Installation on Kubernetes](./docs/installation-on-kubernetes.md)
* [Installation on Docker](./docs/installation-on-docker.md)
* [Built-in dashboards and charts](./docs/built-in-dashboards-and-charts.md)
* [Prometheus Exporter and Grafana Dashboards](./docs/prometheus-exporter-grafana-dashboard.md)
* [Configuration Settings](./docs/configuration-settings.md)
* [Centralized multi Kubernetes clusters analytics](./docs/multi-cluster-analytics.md)
* [Installation on Kubernetes](./docs/installation-on-kubernetes.md)
* [Installation on Docker](./docs/installation-on-docker.md)
* [Built-in dashboards and charts](./docs/built-in-dashboards-and-charts.md)
* [Prometheus Exporter and Grafana Dashboards](./docs/prometheus-exporter-grafana-dashboard.md)
* [Configuration Settings](./docs/configuration-settings.md)
* [Centralized multi Kubernetes clusters analytics](./docs/multi-cluster-analytics.md)

# Design Fundamentals
Checkout the [Design Fundamentals](./docs/design-fundamentals.md) documentation to learn more about `kube-opex-analytics`, it introduces concepts and implementation decisions.

> **Multi-cluster analytics:** `kube-opex-analytics` tracks the usage for a single instance of Kubernetes. For a centralized multi-Kubernetes usage analytics, you may have to consider our [Krossboard](https://krossboard.app/) product. Watch a [demo video](https://youtu.be/lfkUIREDYDY).
# License
Expand All @@ -54,3 +54,4 @@ Use this [link to submit issues or improvement ideas](https://github.com/rchakod
To contribute bug patches or new features, please submit a [Pull Request](https://github.com/rchakode/kube-opex-analytics/pulls).

Contributions are accepted subject that the code and documentation be released under the terms of Apache 2.0 License.

15 changes: 9 additions & 6 deletions docs/built-in-dashboards-and-charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This section describes the built-in dashboards and charts provided by `kube-opex
- [Built-in Dashboards and Charts of kube-opex-analytics](#built-in-dashboards-and-charts-of-kube-opex-analytics)
- [Hourly Consolidated Usage Trends (7 days)](#hourly-consolidated-usage-trends-7-days)
- [Hourly Usage/Requests Efficiency (7 days)](#hourly-usagerequests-efficiency-7-days)
- [Daily CPU and Memory Usage (14 days)](#daily-cpu-and-memory-usage-14-days)
- [Daily Consumption Accounting (14 days)](#daily-consumption-accounting-14-days)
- [Monthly CPU and Memory Usage (12 months)](#monthly-cpu-and-memory-usage-12-months)
- [Nodes' Occupation by Pods](#nodes-occupation-by-pods)
- [Export Charts and Datasets (PNG, CSV, JSON)](#export-charts-and-datasets-png-csv-json)
Expand All @@ -30,14 +30,17 @@ The date filter can be used to zoom out/in on a specific time range.

These charts are based on data consolidated hourly thanks to sample metrics collected every five minutes from Kubernetes.

## Daily CPU and Memory Usage (14 days)
For the different namespaces discovered in the Kubernetes cluster, these charts show daily cumulative usage for CPU and memory resources during the last 2 weeks.
## Daily Consumption Accounting (14 days)
The daily accounting charts are provided per namespace for CPU and Memory resources and cover the last 14 days (2 weeks).

![](../screenshots/sample-two-weeks-daily-usage.png)
According to the [selected accounting model (](design-fundamentals.md#usage-accounting-models), the charts display one of the following metrics :

These charts are based on data consolidated hourly thanks to sample metrics collected every five minutes from Kubernetes.
* Daily cumulative sum of actual hourly consumption per namespace.
* Daily cumulative sum of the maximum between the actual hourly consumption and the requested capacities.
* Daily cumulative sum of actual hourly computedd from an actual cluster cost set statically based on a fixed hourly rate, or determinated dynamically from allocated resources on public clouds (nodes, storage, etc.).

![](../screenshots/sample-two-weeks-daily-usage.png)

Depending on the [selected accounting model](design-fundamentals.md#usage-accounting-models), the values on these charts can be actual costs (`CHARGE_BACK` model), cumulative usage (sum of hourly consolidated usage, `CUMULATIVE_RATIO` model), or a percentage of the global cluster usage (`CHARGE_BACK` model, `100%` means the global cluster usage).

## Monthly CPU and Memory Usage (12 months)
For the different namespaces discovered in the Kubernetes cluster, these charts show monthly cumulative usage for CPU and memory resources during the last 12 months.
Expand Down

0 comments on commit 2d88c86

Please sign in to comment.