Client success stories

Cracking the Kubernetes Cost Code: Achieving Clarity in Shared and Unexplored Cost Mapping

Enhanced Kubernetes (K8s) cost management through a comprehensive solution that integrated SCAD, AWS Cost Explorer, AWS Glue, Athena, Power Athena Exporter, Amazon QuickSight, and AWS native tags. The project enabled precise unit cost mapping and resolved shared cost complexities by automating the extraction, transformation, and categorization of cost data. This solution empowered organizations to optimize cloud spending, improve resource utilization, and achieve greater financial control in their Kubernetes environments.

3 min read
Product screenshot

Details

Industry:
Insurance

Project Type:
Cloud Cost Optimization & Governance

Challenge

Managing costs in Kubernetes environments can be challenging, particularly when dealing with shared resources and unexplored cost allocations. AWS Cost and Usage Reports (CUR) with Split Cost Allocation Data (SCAD) present caveats that make cost attribution complex: Undefined CPU/memory requests result in missing split cost allocation data. SCAD only reports requested, not actual, allocated resources. Regional accounts may lack full allocation access compared to global accounts. SCAD splits costs only for RunInstance operations, leaving many EC2-related costs unallocated.

Solution

VirtueCloud implemented a structured approach using SCAD to enhance Kubernetes cost transparency:

Computing unit costs for CPU and memory by applying AWS's 9:1 cost ratio.

Allocating reserved vs. actual resource usage to accurately reflect cost distribution.

Determining unused capacity at the instance level for better optimization.

Key solutions included:

Cost Calculation Framework:

Memory/CPU Unit Cost Derivation: Used AWS's 9:1 CPU-memory cost ratio to determine per-unit costs.

Allocated vs. Unused Resource Accounting: Ensured costs reflected the higher of reserved or actual usage.

Example Implementation: Demonstrated cost breakdown for a 4-pod setup with varying resource utilization.

Policy Enforcement & Optimization:

Unallocated Costs Handling: Developed a methodology for allocating unsplit EC2 costs to microservices.

Resource Definition Best Practices: Encouraged defining CPU/memory requests to ensure proper cost attribution.

Optimized SCAD Integration: Leveraged available AWS tools to improve visibility into cost structures.

Objectives and Key Results

Objective 1: Improve Kubernetes cost transparency and allocation accuracy.

Key Result 1.1: Achieve 80% accuracy in cost allocation through defined resource requests.

Key Result 1.2: Reduce the percentage of unallocated EC2 costs by 60%.

Objective 2: Optimize resource utilization and reduce wastage.

Key Result 2.1: Identify and optimize unused capacity, reducing unallocated resources by 50%.

Key Result 2.2: Implement monitoring dashboards to track cost efficiency metrics.

Objective 3: Enhance Kubernetes cost governance and best practices.

Key Result 3.1: Increase the adoption of CPU/memory request definitions by 70% among teams.

Key Result 3.2: Standardize Kubernetes cost allocation policies across all projects.

Project Outcomes:

VirtueCloud’s SCAD-based approach led to:

Increased cost attribution accuracy: Achieved 80% accuracy in splitting costs across Kubernetes workloads.

Improved resource efficiency: Reduced unallocated EC2 costs by 60%, optimizing cost-to-performance ratios.

Better governance and visibility: Enhanced monitoring and reporting with cost dashboards, enabling proactive cost management.

Adoption of best practices: Increased CPU/memory request definitions by 70%, ensuring accurate cost distribution.

Future Updates

Moving forward, VirtueCloud aims to:

Expand compliance monitoring by incorporating additional cost governance frameworks.

Scale cost optimization strategies across multi-cloud environments.

Enhance automation by integrating AI-driven cost forecasting and anomaly detection.

Improve Kubernetes security-cost correlation to provide a more holistic resource management approach.