Kompass Pod Rightsizing is built on a modular architecture designed to automate and enforce optimal resource allocation in Kubernetes clusters. The solution collects container-level metrics using VictoriaMetrics (or optionally Prometheus, if already deployed) to track CPU and memory usage over time. These metrics are continuously analyzed by the Recommendation Maker, a component that runs at defined intervals and generates optimized CPU and memory request values based on workload behavior.
Once a recommendation is generated, the Action Taker applies the changes by patching the relevant Kubernetes workloads and initiating a controlled rollout to update the resource requests. To prevent drift and ensure consistency, the Admission Controller acts as a gatekeeper by intercepting and validating all incoming change requests. It ensures that only rightsizing changes approved by Kompass are applied, and it blocks conflicting updates from GitOps or IaC tools like Argo CD, Terraform, or Pulumi.
This pipeline ensures continuous optimization while maintaining alignment with existing CI/CD and infrastructure workflows. The system is designed to handle updates gradually to avoid disruptions and includes rollback capabilities in case resource adjustments negatively impact application stability.
The following steps summarize how the Pod rightsizing solution works:
Collect and store metrics
The TSDB collects and stores container-level CPU and memory metrics from the cluster.Analyze data and generate recommendations
Every 30 minutes, the Recommendation Maker pulls data from the TSDB, analyzes it, and generates optimization recommendations for managed workloads.Update action plan
If changes are needed, the Recommendation Maker updates the Action CRD with the required action details.Apply changes
The Action Taker detects updates to the Action CRD and applies the changes serially using rolling updates.Enforce updates
The mutation webhook enforces resource changes made by Kompass Pod Rightsizing.
Where to go from here