Kubernetes
Overview
Agentless Kubernetes Cost Management
Finout’s solution for managing container costs is entirely agentless, reducing security risks and eliminating performance overhead. It automatically detects Kubernetes usage and waste across any Kubernetes resource, whether running on Amazon EKS, Google GKE, or Azure AKS - and enriches your cost data for precise visibility and optimization. Finout integrates with Prometheus, supporting both Per-Cluster and Centralized Prometheus monitoring tools.
How the Agentless Architecture Works
Unlike traditional agent-based tools that run continuously and consume cluster resources, Finout uses a scheduled, read-only cronjob that runs periodically to collect Kubernetes metrics from your clusters, using Prometheus querying.
Key benefits of this design:
Non-intrusive: No Finout components are installed in your cluster, and no Kubernetes resources are modified by Finout.
Periodic collection: metrics are gathered based on a user-configured schedule, minimizing resource impact.
External storage: collected metrics are stored in your configured S3 bucket; nothing is written directly to your cluster.
Minimal setup: works seamlessly with your existing Prometheus infrastructure without requiring elevated permissions or persistent components. This lightweight approach maintains both system security and operational efficiency, while providing a reliable cost visibility across all your Kubernetes environments.
This integration supports both metric collection methods:
Per-Cluster Prometheus Monitoring: Integrate Finout with the Prometheus instance in each of your monitored clusters.
Each Cost Center’s configuration determines how the Finout Metrics Exporter CronJob collects metrics. The CronJob will be set up to gather data from every monitored cluster according to its associated Cost Center configuration.
How do I integrate multiple clusters?
Apply the cronjob YAML to every cluster that shares the same configuration. All of them will write to the same S3 bucket and prefix.
If you want different S3 locations (buckets/prefixes), create additional Prometheus integrations.
Centralized Prometheus Compatible Monitoring Tools: Centralized Prometheus Monitoring tools aggregate metrics from multiple Kubernetes clusters into a single, unified monitoring system with a central Prometheus-compatible API.
To integrate Centralized Prometheus Monitoring tools into Finout, create a single Prometheus integration that connects to that tool’s centralized API, by selecting the specific tool you’re using:
How the Integration Works
Finout's Kubernetes Prometheus cost integration follows a simple, three-step process:
Metrics Export: Finout’s cronjob exports container metrics from your Kubernetes clusters using per-cluster or centralized metrics monitoring on scheduled periods.
Metrics Storage: All the exported metrics and the cronjob’s logs are written to your configured S3 bucket (i.e.,
s3://<S3_BUCKET>/<S3_PREFIX>/<CLUSTER_NAME>/…)Cost Enrichment: Finout processes your stored metrics, validating and normalizing them, then enriches your cloud billing data with these metrics to provide cost analysis that supports Kubernetes-level abstraction and granularity i.e., (namespaces, workloads, and labels).
Prerequisites
Before integrating your Kubernetes clusters with Finout, ensure the following requirements are met:
Working Prometheus Deployment: A functioning Prometheus instance, server, or Prometheus-compatible monitoring system.
Cluster Labeling: Ensure your metrics include a cluster label to distinguish between different clusters in multi-cluster environments
Kubernetes Metrics Scraping: Prometheus must be configured to scrape Kubernetes metrics using
kube-state-metricsThe version must be 2.0.0 or higher.
Finout fetches these metrics from your Prometheus endpoint:
kube_node_info
Yes
Required to calculate Cost Allocation. This metric enables the connection of nodes and pods to billing.
container_cpu_usage_seconds_total
Yes
Actual container CPU usage.
container_memory_working_set_bytes
Yes
Actual container memory usage.
kube_node_status_capacity{resource="cpu"}
Yes
Node CPU cores capacity.
kube_node_status_capacity{resource="memory"}
Yes
Node memory capacity.
kube_pod_container_resource_requests{resource="cpu"}
Yes
Pod/container CPU requests improve accuracy and enable rightsizing recommendations in CostGuard.
kube_pod_init_container_resource_requests{resource="cpu"}
Recommended
Improves accuracy by collecting CPU requests from initContainers. Relevant especially when the initContainers running as sidecars.
kube_pod_container_resource_requests{resource="memory"}
Yes
Pod/container memory improves accuracy and enables rightsizing recommendations in CostGuard.
kube_pod_init_container_resource_requests{resource="memory"}
Recommended
Improves accuracy by collecting memory requests from initContainers. Relevant especially when the initContainers running as sidecars.
container_network_receive_bytes_total
Recommended
Container incoming network usage.
container_network_transmit_bytes_total
Recommended
Container outgoing network usage.
kube_pod_labels
Recommended
Enables filtering/grouping by pod labels.
kube_node_labels
Recommended
Enables filtering/grouping by node labels.
kube_namespace_labels
Recommended
Enables filtering/grouping by namespace labels.
kube_pod_info
Recommended
Needed to allocate costs to higher-level K8s objects (deployment, statefulset, daemonset, cronjob) instead of just pods.
kube_replicaset_owner
Recommended
Allows rolling pod costs up to deployments accurately.
kube_job_owner
Recommended
Allows rolling pod costs up to cronjob definitions rather than individual jobs.
Next Steps
Once you've verified your prerequisites and ensured the required metrics are exposed, proceed to the integration guide for your specific monitoring tool:
Centralized Prometheus Monitoring Tool Integration (Coralogix, Thanos, Mimir, VictoriaMetrics)
For additional support, consult our FAQ and Troubleshooting section or contact Finout support at [email protected].
Last updated
Was this helpful?