#3956·opencost

OpenCost omits Native Sidecar container resources from Pod cost calculations

Author: subpathdevCreated Jul 22, 2026Updated Sep 11, 2026

Describe the bug As described in the Sidecar Containers Kubernetes Documentation, these sidecars are defined as init Containers. As far as I understand the implementation, opencost is querying the kube state metric kube_pod_container_resource_requests . Bu the kubernetes sidecar resources are been reported in the metric kube_pod_init_container_resource_requests. If containers sidecars are been used, the reported costs by opencost are not entirely correct.

Native Sidecars are been used in example by the istio project (istio proxy on the pod level).

To Reproduce Steps to reproduce the behavior:

  1. run a normal installation of opencost and a a standard deployment with a sidecar container (take a look on the documentation linked above) and request some resources for this sidecar
  2. calculating the cost for the pod / deployment by your own and compare it against the reported value of opencost.

Expected behavior I would expect that kubernetes sidecars are been included in the cost calculation (pod, deployment, waste, ...)

Screenshots If applicable, add screenshots to help explain your problem.

Which version of OpenCost are you using? 1.120.2 but as far as I understand, the problem is still present in the current version

Additional context Add any other context about the problem here. Kubernetes versions and which public clouds you are working with are especially important.

  • kubernetes 1.34

** Additional observation:** I do not have validated it but kubernetes allows in the meantime to request resources on the pod level as well. From my perspective this is missing as well.