Skip to content
October 27, 2021
7 min read time

The hidden costs behind containerised applications

If you are running Kubernetes ('K8s' for short) on a hyperscaler such as AWS, Azure or Google, you should be able to fairly accurately gauge the total cost of K8s resources at any given time but if you want to drill down into the underlying costs associated with your K8s clusters the details rapidly become opaque. It's a common business requirement to split costs out by Namespace, Service or more granular levels still and such levels of detail are not available from most cloud providers.

Calculating Hybrid Costs for Containers

The challenge increases in a hybrid scenario where parts of your Kubernetes cluster are distributed between public and private cloud environments. At this point you’re pretty much on your own.

Let's not get into the reasoning whether on-premise is more cost-effective or not; this very much depends on the size of your business, staffing costs in your region and how effectively your organization has adopted automation strategies such as DevOps, FinOps and so forth.

Searching the internet will return results that try to justify either side but such calculations are often biased as they are provided by vendors leaning towards one conclusion or the other. The reality is that you really have to do these calculations for your own business, ideally incorporating them into your billing or chargeback cost allocation strategy.

 Example comparison sheet comparing public versus private

 

Once you have established your real operating costs you will then need to spread your costs accordingly across your containers, Kubes, and Namespaces. But how?

At Exivity we have built a number of templates that you can use to achieve these types of cost distribution strategies. In the example below you can see it is possible to ingest your Kubernetes metrics and group them at the Namespace, Service, and Kube levels:

 Kubernetes metering and billing

 

It is also possible to view which Kubes are consuming how many resources:

 Kubernetes containers usage report

 

An important feature of Exivity is not only that it meters your consumption but also snapshots your Kubernetes consumption metrics via the Prometheus data source. This means you don’t need to keep long-term historical records in your Prometheus database as Exivity provides you with this system of record.

Data retention in Exivity typically aligns with your accounting needs, in most cases this being 5 years or more. You probably wouldn’t want to keep that amount of historical data in your Prometheus database as it will clutter your data store. Exivity is optimal for keeping track of such accounting data through techniques including mapping, normalisation, and aggregation.

If you’d like to learn more about the possibilities Exivity can offer when it comes to tracking the operating costs of your Kubernetes clusters, just fill in our contact form here: https://exivity.com/get-started.

We would be delighted to tell you all about it and can get you started with a free-of-charge trial run!

Create your account today!

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.