<p>How do I do chargeback for shared Kubernetes clusters on Azure? Say there are 10 departments/customers using a cluster split by namespaces, How do I bill them?</p>

<p>You might want to have a look on <a href="https://github.com/kubecost" rel="nofollow noreferrer">kubecost</a>.</p>
<blockquote>
<p>Kubecost models give teams visibility into current and historical Kubernetes spend and resource allocation. These models provide cost transparency in Kubernetes environments that support multiple applications, teams, departments, etc.</p>
</blockquote>
<p><code>Kubecost</code> enables you to get:</p>
<ul>
<li><p>Real-time cost allocations by all key k8s concepts,</p>
</li>
<li><p>Cost allocation by configurable labels to measure spend by owner,
team, department, product, etc.</p>
</li>
<li><p>Dynamic asset pricing enabled by integrations with AWS and GCP
billing APIs, estimates available for Azure</p>
</li>
<li><p>Cost allocation metrics for CPU, GPU, memory, and storage</p>
</li>
<li><p>Out of cluster cloud costs tied back to owner</p>
</li>
<li><p>You can also export billing data back to Prometheus for further
analysis</p>
</li>
</ul>
<p>Check also <a href="https://karlstoney.com/2018/07/07/managing-your-costs-on-kubernetes/" rel="nofollow noreferrer">this</a> article. It shows a way for checking costs using Grafana.</p>
