Inventory of softwares running in a Kubernetes cluster
Project description
Kube Inventory
A tool to inventory and track software versions running in Kubernetes clusters, helping identify outdated applications that may need upgrades.
Overview
Kube Inventory scans your Kubernetes cluster to identify running applications and compares their versions against the latest releases available in their GitHub repositories. This helps you quickly assess which applications need updates.
Features
- Multiple Output Formats: Export inventory data as
json,csvor expose via Prometheus metrics - GitHub Integration: Automatically fetches latest release information from GitHub repositories
- Kubernetes Native: Works with standard
kubeconfigorin-clusterconfiguration - Custom Application Support: Extend the default application list with custom definitions
- Prometheus Integration: Expose metrics for monitoring and alerting
- Web Interface: Built-in web server for Prometheus mode
Utilization
The tool can be run from the command line with various options to customize its behavior or by Kubernetes, and then generating Prometheus metrics for monitoring purposes.
CLI Mode
You can run Kube Inventory from the command line to generate inventory reports in your desired format. Use the --output-mode flag to specify the format (json or csv).
The installation can be easily done via pip:
pip install kube-inventory
Example command to run Kube Inventory in CLI mode:
kube-inventory
The reports will be saved in the default output directory specified by the argument --output-dir, which defaults to the current directory.
In this sample output, you can see the generation of the report in the csv format:
Prometheus Mode
You can also run Kube Inventory in Prometheus mode, where it exposes the inventory data as metrics via a built-in web server. This allows you to integrate with Prometheus for monitoring and alerting.
You can specify the output mode as prometheus using the --output-mode flag, and them application will start a web server to expose the metrics in Prometheus format.
In case you want to install Kube Inventory in a Kubernetes cluster, you can use the provided Helm chart available in the srekit/helm-charts/kube-inventory,
You could also have the possibility to visualize the metrics using Grafana dashboards, besides trigger alerts using Prometheus rules.
Command-Line Options
| Argument | Options | Description | Default |
|---|---|---|---|
| --extra-apps-file-path | Path to YAML file | Path to custom applications YAML file | None |
| --github-access-token | String | GitHub access token for API requests | None |
| --github-api-url | URL | Base URL for GitHub API | https://api.github.com |
| --kube-config-path | Path to kubeconfig file | Path to the kubeconfig file to use | ~/.kube/config |
| --kube-in-cluster | Boolean | Use in-cluster Kubernetes config | False |
| --log-level | debug, info, warning, error |
Logging level for the application | info |
| --output-dir | Path to output directory | Directory to save output files | Current directory |
| --output-mode | json, csv, prometheus | Output format for the inventory data | json |
| --output-refresh-interval-seconds | Integer (seconds) | Refresh interval for Prometheus mode | 300 |
| --version | Show application version and exit | ||
| --web-host | Hostname or IP | Host for the web server in Prometheus mode | 0.0.0.0 |
| --web-port | Integer (port number) | Port for the web server in Prometheus mode | 8080 |
Environment Variables
The following environment variables can be used as alternatives to command-line arguments:
| Environment Variable | Description |
|---|---|
GITHUB_ACCESS_TOKEN |
GitHub access token for API requests |
LOG_LEVEL |
Logging level for the application |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kube_inventory-1.0.1.tar.gz.
File metadata
- Download URL: kube_inventory-1.0.1.tar.gz
- Upload date:
- Size: 24.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbf7bdc59190fc80cafa327a60707c7b41dc4969a2a1e91bac4ea9f1ff9d7f0c
|
|
| MD5 |
065099d5c92e22610690ba88eb87c606
|
|
| BLAKE2b-256 |
0b9196e4d04214b9e7eec0bffc3f47f501769dfb3d380fc3e3b7b0161ae05406
|
Provenance
The following attestation bundles were made for kube_inventory-1.0.1.tar.gz:
Publisher:
release.yaml on srekit/kube-inventory
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kube_inventory-1.0.1.tar.gz -
Subject digest:
dbf7bdc59190fc80cafa327a60707c7b41dc4969a2a1e91bac4ea9f1ff9d7f0c - Sigstore transparency entry: 790900317
- Sigstore integration time:
-
Permalink:
srekit/kube-inventory@c0da5fa65facf012de7296a80c597d9a9158e06d -
Branch / Tag:
refs/tags/1.0.1 - Owner: https://github.com/srekit
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@c0da5fa65facf012de7296a80c597d9a9158e06d -
Trigger Event:
release
-
Statement type:
File details
Details for the file kube_inventory-1.0.1-py3-none-any.whl.
File metadata
- Download URL: kube_inventory-1.0.1-py3-none-any.whl
- Upload date:
- Size: 32.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3627e29fb1f2e40a444c84c0c596d7b165a314b54ad8d930facb9fdd15438d4
|
|
| MD5 |
358a72cc00afb89cca44b19361b3242b
|
|
| BLAKE2b-256 |
2096040497525b49a1a25f13e94986b0da663ecc8503f3faab834aa8d6b9c308
|
Provenance
The following attestation bundles were made for kube_inventory-1.0.1-py3-none-any.whl:
Publisher:
release.yaml on srekit/kube-inventory
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kube_inventory-1.0.1-py3-none-any.whl -
Subject digest:
c3627e29fb1f2e40a444c84c0c596d7b165a314b54ad8d930facb9fdd15438d4 - Sigstore transparency entry: 790900319
- Sigstore integration time:
-
Permalink:
srekit/kube-inventory@c0da5fa65facf012de7296a80c597d9a9158e06d -
Branch / Tag:
refs/tags/1.0.1 - Owner: https://github.com/srekit
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@c0da5fa65facf012de7296a80c597d9a9158e06d -
Trigger Event:
release
-
Statement type: