Container Cost

Understanding the cost of your containerized workloads

The CloudZero Container Cost Solution

CloudZero combines container utilization data with your actual cloud provider costs to give you accurate allocation of costs within a Kubernetes cluster. Pod, CPU, and memory usage are automatically correlated with costs to give you detailed breakdowns of real cost by cluster, namespace, pod, or label down to the hour. And CloudZero doesn’t require you to manually define complex rules for allocating Kubernetes costs. We use a proprietary algorithm to calculate it automatically based on industry best practices and our own experience working with customers.

The integration is based off installing a CloudZero agent as a daemonset to collection Kubernetes performance metrics and shipping then directly to CloudWatch Logs. The agent is a fork of the popular AWS Container Insight Agent.

CloudZero combines the metrics from the CloudZero CloudWatch Agent with AWS billing information to automatically allocate costs to the workloads being orchestrated by Kubernetes. We calculate the cost of each pod within the architecture, and then re-aggregate them to attribute costs to other hierarchical kubernetes concepts, like namespaces and clusters.

Container cost becomes a first class citizen along with your other AWS spend. Now Kubernetes, AWS, Azure, GCP, and Snowflake spend can be combined together to map to your business.

GKE Cost Allocation

For users managing Kubernetes workloads in Google Cloud's Google Kubernetes Engine (GKE), CloudZero offers integrated support to capture and analyze your cost data, regardless of whether you have the GKE Cost Allocation feature enabled or not.

If you have GKE Cost Allocation enabled within GCP, CloudZero seamlessly integrates this granular cost data, ensuring you get the most accurate cost metrics for your Kubernetes deployments on GKE. The data from GKE will be included with the Kubernetes cost data from other cloud providers, giving you a holistic view across all your multi-cloud Kubernetes deployments.

By doing this, we make sure that your GKE spend is just as transparent and analyzable as any other cloud provider's Kubernetes costs. With CloudZero, tracking and optimizing your GKE costs becomes easier than ever before.

Important Note: Currently, the GKE Cost Allocation from Google Cloud does not account for Flexible Committed Use Discounts. As a result, the Cost Data presented within the CloudZero platform might not reflect these discounts accurately. We are actively working on enhancing our system to incorporate Flexible CUD cost data into the GKE Cost Allocation metrics.


Enabling GKE Cost Allocation in Google Cloud

To utilize the integrated support for GKE Cost Allocation within CloudZero, activation within the Google Cloud Platform is required. Follow the step-by-step guide below to ensure correct setup:

  1. Google Cloud Console Access: Begin by navigating to the Google Cloud Console and signing in using your account credentials.

  2. Project Selection: Once logged in, employ the project drop-down menu situated at the console's top. From here, select the GCP project that houses your GKE cluster.

  3. Kubernetes Engine Navigation: Direct your attention to the left-hand navigation pane. Here, select the "Kubernetes Engine" option.

  4. Cluster Selection: To specify which cluster you intend to modify, simply click on its name from the list presented.

  5. Features Access: Navigate to the lower segment of the page, specifically to the "Features" subsection. Within this area, seek out the "Cost Allocation" option.

  6. Activation: Adjacent to the "Cost Allocation" label, click the "Edit" icon. Subsequently, select "Enable Cost Allocation" and finalize by clicking "Save Changes".


Important Considerations:

The aforementioned steps must be replicated for every individual cluster where Cost Allocation activation is desired. Post-activation, anticipate a duration of up to three days for GKE Cost Allocation data to become visible.

For a deeper dive and comprehensive understanding, please consult the official !Google Cloud Documentation on Cost Allocations.

Automatic Cost Allocation

Cost is calculated based on the cost of the EC2 instance - which represents the cost of a node in the Kubernetes system - combined with pod-level CPU and memory utilization using a custom cost model that CloudZero developed. This allows us to assign a portion of the node’s total cost to the pod. This is handled automatically in the CloudZero platform; there is no need for manual allocation rules.

Generally speaking, this proportional algorithm works across a broad range of EC2 instance types, including those with SSD, NVMe SSD, GPU cores, GPU memory, and networking enhancements.

The final result is a new way to explore your container costs over time by cluster, pod, or namespace using CloudZero. For example, we can use CloudZero to take a look at one of our clusters and see how its costs decrease as we scale down the cluster.


Cluster Idle Costs

The CloudZero platform considers a resource provided by an EC2 instance — either CPU or memory — fully utilized in a given hour if pods running on that instance utilized or requested (maximum of the two,) an average of 75% or more of its available capacity. If a lesser amount was utilized, the difference is assigned to an "Idle" bucket representing the unused capacity of the EC2 instances comprising the cluster.

In the next sections, we cover the installation and usage of the Container Cost feature.

Supported Platforms

Amazon Elastic Kubernetes Service (Amazon EKS) on Amazon EC2
Self-managed Kubernetes infrastructure on Amazon EC2
Amazon ECS on Fargate can be supported in limited situations
Amazon ECS on EC2 can be supported in limited situations
Google Cloud GKE (With GKE Cost Allocation Enabled or Disabled)
NOTE: AWS EKS on AWS Fargate is not supported at this time