Cost Analysis
A containerized Kubernetes environment can run many services and applications on shared infrastructure. This makes it difficult to understand the costs for each component, whether it’s an application, service, or environment.
Ocean simplifies cost analysis without needing extensive resource tagging. It:
- Breaks down cluster infrastructure costs.
- Provides insights at different levels.
- Helps analyze application spending and supports chargebacks.
You can see costs organized by namespaces and individual workloads. You can filter by container labels and annotations to view compute and storage costs for each workload. This helps you understand your cloud spending and manage costs better.
- For Amazon ECS, costs are organized by services rather than namespaces.
- Only the AWS Kubernetes cost analysis includes network costs.

- For ECS only, costs are broken down by services, not namespaces.
- Only AWS Kubernetes cost analysis includes network costs.
How It Works
Ocean calculates compute and storage costs by identifying their sources. It looks at all workloads in the cluster and divides managed infrastructure costs based on each workload’s usage.
Compute Costs
Ocean calculates cluster costs by:
- Aggregating CPU and memory requests for each workload every hour with data from the container orchestrator.
- Finding the total managed infrastructure cost across spot, reserved, and on-demand instances.
- Assigning costs to each workload based on its resource requests.
For example, if a workload requests 20% of the cluster’s resources and the total cost is $100, that workload’s cost is $20.
Ocean assigns cost weights based on:
- Differences in pricing between vCPU and memory from the cloud provider.
- The CPU-to-memory ratio in the cluster, indicating if the cluster is more CPU or memory optimized.
Depending on the instance type, 1 vCPU can cost 7 to 13 times more than 1 GiB of memory. A memory-optimized cluster should value memory more, while a CPU-optimized cluster should prioritize CPU costs.
Here are two examples:
-
Cluster-1 has 40 vCPU and 320 GiB memory (1 CPU : 8 memory ratio)
-
Cost weight for Compute (vCPU) = 48% and memory (GiB) = 52%
-
If workload-1 requests resources for 2 vCPUs and 12 GiB of memory, and total allocatable resources are 40 vCPUs and 320 GiB of memory, the resource allocation calculation is:
Resource allocation = (0.48 * 2/40) + (0.52 * 12/320) = 0.044 or 4.4%
-
Workload-1 uses 4.4% of the total cluster allocatable resources and will be assigned 4.4% of Cluster-1 compute costs.
-
-
Cluster-2 has 120 vCPU and 120 GiB memory (1 CPU : 1 Mem ratio)
-
Cost weight for Compute (vCPU) = 91% and memory (GiB) = 9%
-
If workload-2 requests resources for 4 vCPUs and 6 GiB of memory, and the total allocatable resources are 120 vCPUs and 120 GiB of memory, the resource allocation calculation is:
Resource allocation = (0.91 * 4/120) + (0.09 * 6/120) = 0.035 or 3.5%
-
Workload-2 uses 3.5% of the total cluster allocatable resources and will be assigned 3.5% of Cluster-2 compute costs.
-

Headroom and Idle Resources
Ocean includes Headroom in its cost analysis, shown as a separate item. Headroom is reserved capacity to support workload scaling and stability. In contrast, idle resources are unused allocations not consumed by active workloads. Separating these helps clarify which costs are strategic versus wasteful.
Storage Costs
Ocean calculates storage costs for persistent volumes (PVs) based on AWS EBS or GCP persistent disks by:
- Aggregating hourly usage data, including volume size, volume ID, and price per hour.
- Calculating persistent volume claim (PVC) costs:
- For each pod using PVCs, Ocean finds the cost by multiplying (pod run time) by (storage pricing).
- It sums the PVC costs for each pod.
- Ocean displays storage costs per workload, per hour. For standalone pods, it aggregates and separates total storage costs.
Root Volume Costs
You can see a complete view of storage costs, including AWS EBS volumes attached to cluster node instances but not used as persistent volumes (PVs). These costs are shared evenly between all workloads on the instance, providing fair distribution and visibility into infrastructure spending.
EFS Costs (for AWS only)
Ocean includes Elastic File System (EFS) storage costs. These costs depend on Amazon's storage classes and throughput pricing.
To connect EFS storage costs to workload breakdowns, Ocean:
- Retrieves the hourly costs for EFS storage from your AWS account.
- Tracks which pods are using EFS storage each hour:
- Ocean looks at specific settings on the PVCs linked to the pods to see which ones are using EFS. In a Kubernetes deployment, all replicas share the same PVC, so the storage cost for each pod gets divided among all the replicas running at that time.
- For the identified pods, Ocean divides the costs evenly across the different workloads that are using the EFS. If one EFS storage system is being used by multiple applications (workloads) in a cluster or even across different clusters, Ocean also shares the costs evenly among those various workloads.
To retrieve EFS information, Ocean requires the elasticfilesystem:DescribeFileSystems
permission in the Access Policy.
Network Costs (for AWS Kubernetes only)
Ocean network costs measure data transfer costs (in $) and bandwidth usage (in GB) for Kubernetes applications.
To enable network costs, install the network client (agent), which runs as a DaemonSet on every node in the Kubernetes cluster.
Ocean identifies and attributes cloud provider data transfer costs to Kubernetes applications, based on the following categories.

-
Internet: When your application sends data to an external IP address outside your cloud provider, it incurs Internet data transfer costs based on the amount of data sent. For example, if a streaming service sends videos to users or if a sales application backs up data to another cloud, this kind of cost applies. Notably, cloud providers usually do not charge for incoming internet traffic.
-
Inter-Region: When data travels from one region to another—such as from North America to Europe—Inter-Region data transfer costs apply. The cost depends on how much data is sent and typically varies based on the source region of the traffic.
-
Inter-AZ: If traffic moves between different Availability Zones (AZ) within the same region, costs are incurred for both sending and receiving the data. This means that both the source and destination workloads are charged for the data transferred between them.
-
Intra-AZ: Generally, traffic moving within the same AZ is free. However, costs may apply if an application accesses services through public IPs (like DNS or load balancers). Some examples include:
- Using public IPs for DNS or Ingress.
- Load balancer traffic using a public IP instead of the private IP of a pod.
Cost-free traffic: If all application traffic remains within the same AZ and only uses private IPs, you'll see some Intra-AZ bandwidth usage reported, but the cost will be $0.0
The network costs analysis architecture is shown below.
The Ocean network client is installed and deployed in the Kubernetes cluster and operates as a DaemonSet on each node. It consists of an exporter and an eBPF packet counter that gather network flow metrics from the pods on the node. These metrics are sent at regular intervals to the Ocean backend cluster (AWS) for network cost calculation and aggregation. The data can be retained for up to 90 days.
Breakdown Types
By default, Ocean displays cost breakdowns for each workload, such as Kubernetes deployments. However, you can also view itemized costs by labels and annotations. This feature is a powerful tool that allows you to analyze cluster usage by department, application, or function, such as development, testing, or production. You can use any labeling system you have implemented.
The analysis also includes cost details for various Kubernetes elements, such as Deployment, DaemonSet, StatefulSet, and Job.
Captured Data Scope
Ocean captures and displays data exclusively from instances (nodes) managed by Ocean. Instances not under Ocean's management are excluded from the analysis.