Learn about the configuration settings for KubeLedger.
Configuration Environment Variables
These are startup environment variables that require to restart the service when they are updated.
KL_DB_LOCATIONsets the path to use to store internal data. Typically when you consider to set a volume to store those data, you should also take care to set this path to belong to the mounting point.KL_K8S_API_ENDPOINTsets the endpoint to the Kubernetes API.KL_K8S_API_VERIFY_SSLboolean to set whether to check validate Kubernetes certificate (defaut istrue).KL_K8S_CACERTsets the path to CA file for a self-signed certificate.KL_K8S_AUTH_TOKENsets a Bearer token to authenticate against the Kubernetes API.KL_K8S_AUTH_CLIENT_CERTsets the path to the X509 client certificate to authenticate against the Kubernetes API.KL_K8S_AUTH_CLIENT_CERT_KEYsets the path to the X509 client certificate key.KL_K8S_AUTH_USERNAMEsets the username to authenticate against the Kubernetes API using Basic Authentication.KL_K8S_AUTH_PASSWORDsets the password for Basic Authentication.KL_COST_MODEL(version >=0.2.0): sets the model of cost allocation to use. Possible values are: CUMULATIVE_RATIO (default) indicates to compute cost as cumulative resource usage for each period of time (daily, monthly); CHARGE_BACK calculates cost based on a given cluster hourly rate (seeKOA_BILLING_HOURLY_RATE); RATIO indicates to compute cost as a normalized percentage of resource usage during each period of time.KL_BILLING_HOURLY_RATE(required if cost model is CHARGE_BACK): defines a positive floating number corresponding to an estimated hourly rate for the Kubernetes cluster. For example if your cluster cost is $5,000 dollars a month (i.e.~30*24hours), its estimated hourly cost would be6.95 = 5000/(30*24).KL_BILLING_CURRENCY_SYMBOL(optional, default is ‘$’): sets a currency string to use to annotate costs on reports.KL_INCLUDED_NAMESPACES(optional, default is ‘*’): comma-separated list of namespaces to monitore. If any value is provided, only these namespaces will be accounted.KL_EXCLUDED_NAMESPACES(optional, default is ‘’): comma-separated list of namespaces to ignore. If any value is provided, these namespaces will be discarded. This options takes precedence overKOA_INCLUDED_NAMESPACES.KL_NVIDIA_DCGM_ENDPOINT(optional): sets the NVIDIA DCGM Exporter endpoint for GPU metrics collection. When set, KubeLedger will poll the DCGM Exporter to collect GPU utilization metrics per pod/namespace. Example:http://dcgm-exporter.gpu-operator:9400/metrics. Requires DCGM Exporter deployed in the cluster.
Deprecated Configuration
The following variables are deprecated and will be removed in a future version. Please use the
KL_equivalents.
KOA_DB_LOCATION(Deprecated) sets the path to use to store internal data. Typically when you consider to set a volume to store those data, you should also take care to set this path to belong to the mounting point.KOA_K8S_API_ENDPOINT(Deprecated) sets the endpoint to the Kubernetes API.KOA_K8S_API_VERIFY_SSL(Deprecated) boolean to set whether to check validate Kubernetes certificate (defaut istrue).KOA_K8S_CACERT(Deprecated) sets the path to CA file for a self-signed certificate.KOA_K8S_AUTH_TOKEN(Deprecated) sets a Bearer token to authenticate against the Kubernetes API.KOA_K8S_AUTH_CLIENT_CERT(Deprecated) sets the path to the X509 client certificate to authenticate against the Kubernetes API.KOA_K8S_AUTH_CLIENT_CERT_KEY(Deprecated) sets the path to the X509 client certificate key.KOA_K8S_AUTH_USERNAME(Deprecated) sets the username to authenticate against the Kubernetes API using Basic Authentication.KOA_K8S_AUTH_PASSWORD(Deprecated) sets the password for Basic Authentication.KOA_COST_MODEL(Deprecated) (version >=0.2.0): sets the model of cost allocation to use. Possible values are: CUMULATIVE_RATIO (default) indicates to compute cost as cumulative resource usage for each period of time (daily, monthly); CHARGE_BACK calculates cost based on a given cluster hourly rate (seeKOA_BILLING_HOURLY_RATE); RATIO indicates to compute cost as a normalized percentage of resource usage during each period of time.KOA_BILLING_HOURLY_RATE(Deprecated) (required if cost model is CHARGE_BACK): defines a positive floating number corresponding to an estimated hourly rate for the Kubernetes cluster. For example if your cluster cost is $5,000 dollars a month (i.e.~30*24hours), its estimated hourly cost would be6.95 = 5000/(30*24).KOA_BILLING_CURRENCY_SYMBOL(Deprecated) (optional, default is ‘$’): sets a currency string to use to annotate costs on reports.KOA_INCLUDED_NAMESPACES(Deprecated) (optional, default is ‘*’): comma-separated list of namespaces to monitore. If any value is provided, only these namespaces will be accounted.KOA_EXCLUDED_NAMESPACES(Deprecated) (optional, default is ‘’): comma-separated list of namespaces to ignore. If any value is provided, these namespaces will be discarded. This options takes precedence overKOA_INCLUDED_NAMESPACES.KOA_NVIDIA_DCGM_ENDPOINT(Deprecated) (optional): sets the NVIDIA DCGM Exporter endpoint for GPU metrics collection. When set, KubeLedger will poll the DCGM Exporter to collect GPU utilization metrics per pod/namespace. Example:http://dcgm-exporter.gpu-operator:9400/metrics. Requires DCGM Exporter deployed in the cluster.
GPU Metrics with NVIDIA DCGM
To enable GPU metrics collection, you need:
- NVIDIA DCGM Exporter deployed in your cluster (see Prerequisites)
- Configure the endpoint via
KOA_NVIDIA_DCGM_ENDPOINTenvironment variable
Collected GPU Metrics
When DCGM integration is enabled, the following metrics are collected per pod:
| Metric | DCGM Source | Description |
|---|---|---|
| GPU Utilization | DCGM_FI_DEV_GPU_UTIL | GPU compute utilization percentage |
| Memory Bandwidth | DCGM_FI_DEV_MEM_COPY_UTIL | GPU memory bandwidth utilization percentage |
| Memory Used | DCGM_FI_DEV_FB_USED | Framebuffer memory used (MiB) |
| Memory Free | DCGM_FI_DEV_FB_FREE | Framebuffer memory free (MiB) |
Helm Configuration
When deploying with Helm, use the dcgm values:
dcgm:
enabled: true
endpoint: http://dcgm-exporter.gpu-operator:9400/metrics
Or via command line:
helm upgrade --install KubeLedger ./manifests/helm \
--set dcgm.enabled=true \
--set dcgm.endpoint=http://dcgm-exporter.gpu-operator:9400/metrics
