<p>I have the following situation: </p>

<p>I have a bunch of deployed things in multiple GKE clusters. I would like to generate billing for my customers who use those deployments. However, I don't want to bill them for network traffic they aren't generating, but my cluster is generating, so inter region / AZ communication is probably my doing, I don't want to bill them for that.</p>

<p>However, I do would like to bill them for traffic they used on / bytes basis. For this, I require to monitor outgoing and incoming traffic, by bytes, and detect if they are in the same region / AZ that the POD in question is currently in.</p>

<p>I heard a podcast recently that there is supposed to be an API for that. Is anyone aware of such a thing that would help me monitor network traffic in such granularity?</p>

<p>Note: The setup is a bit weird so I don't have individual VPCs for deployed apps, which means I can't really use VPC flow logs. It's also not enough to monitor VMs since multiple pods could be on the same VM anyways.</p>

<p>Does anyone know anything at all that could move me along into the right direction?</p>

<p>Cheers!</p>

Hannibal
<p>Perhaps <a href="https://cloud.google.com/blog/products/containers-kubernetes/gke-usage-metering-whose-line-item-is-it-anyway" rel="nofollow noreferrer">GKE usage metering</a> might be of interest to you. Step by step can be found <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-usage-metering" rel="nofollow noreferrer">here</a>. GKE metering will fetch resource usage/consumption from metrics servers, converts the consumption data to usage records and sends the records to a different BigQuery table in the same dataset.</p>
