Over the last couple of years, Kubernetes has emerged as the leading container orchestration tool. Despite having a steep learning curve, companies are jumping on the Kubernetes bandwagon, making it one of the fastest growing open source projects of all time.
As companies transition to production environments on Kubernetes, leveraging multiple cloud providers and on-premise infrastructures, one of the first challenges they encounter is how to accurately allocate Kubernetes costs to different teams, services, applications and departments.
If you have a production grade Kubernetes environment up and running, and haven't heard from Finance yet, trust me you will.
As you scale your Kubernetes environment and your deployments grow larger, you’ll need to understand the costs generated as a result. It is quite difficult to optimize container environments like Kubernetes as it is difficult to understand what exactly is happening within each container. Additionally, companies are spending much more on adopting container technologies, which feeds into the overall IT spend. Case in point - the number of companies spending $500,000 annually on their container environments saw an increase of 27% as compared to last year.
Management wants transparency into these costs and their respective allocation to different services, teams, applications and departments. Accurately allocating these costs to different services and teams, while being a major requirement in itself, is also a first step towards ensuring that the underlying infrastructure is being efficiently utilized.
Why Kubernetes cost allocation is not easy?
The core problem with Kubernetes cost allocation efforts is the lack of visibility into how Kubernetes cluster resource usage is related to the cost of the underlying cloud or on-premise infrastructure Kubernetes is running on top of.
Kubernetes' shared resources model pools the entire underlying compute infrastructure into an overarching entity called clusters. Clusters in turn are made up of individual units of memory and CPU (compute) called nodes. Nodes can be anything from a virtual machine running on a public cloud provider to a physical one running in your data centers. By abstracting away this complexity and also adding another layer of OS abstraction on top, Kubernetes drives efficiency and agility for development and operations teams.
This shared resources model also means that multiple teams and services utilize resources from the same underlying infrastructure. This makes it difficult for IT managers and Finance departments to accurately allocate Kubernetes costs to different services, teams, departments and applications.
The fact that Kubernetes is agnostic to the underlying infrastructure and can run across any number of cloud providers and/or physical infrastructure also means that your containers can pop up anywhere across nodes in your cluster. Keeping track of where nodes and clusters are actually running is essential to cost allocation efforts.
Questions about the overall cost footprint of Kubernetes clusters can have easy answers. Overall Kubernetes costs can be easily correlated to public cloud provider bills (doing this for on-premises infrastructure is not so straightforward). However, a quick look under the hood reveals that visibility into cost drivers and being able to allocate cluster costs to specific teams, applications, services or departments is quite difficult.
Can I use Kubernetes Namespaces to allocate costs?
Kubernetes namespaces are a good starting point for cost allocation. However, it is important to note that namespaces only provide a way for virtual partitioning of your resources. To get fine grained visibility into the cluster resource usage of different namespaces and how they translate into underlying infrastructure costs requires the use of dedicated tools.
The last couple of years have seen a mass migration of enterprises to microservices architectures and container technologies. Current container monitoring and optimization solutions leave much to be desired. At Replex, we are dedicated to putting you back in charge of your IT infrastructure usage. Replex gives you detailed insights and granular control over your container infrastructure cost, governance and optimization. We also have dedicated Kubernetes reporting which helps you manage and allocate costs as well as optimize Kubernetes resource usage.
Would you like to dig deeper and understand how different teams or applications are driving your costs? Request a quick 20 minute demo to see how you can seamlessly allocate Kubernetes costs while saving up to 30% on infrastructure costs using Replex.io.
Fan of all things cloud, containers and micro-services!
This is the second instalment in our blog series about monitoring Kubernetes resource metrics in production. In this post, we complement the process of Kubernetes resource monitoring with Prometheus by installing Grafana and leveraging the Prometheus data source to create information-rich dashboards in a user-friendly visual format.
April 3, 2019
4 min read
In this blog post we will take a deep dive into Kubernetes QOS classes. We will start by looking at the factors that determine whether a pod is assigned a Guaranteed, Burstable or BestEffort QOS class. We will then look at how QOS class impacts the way pods are scheduled by the Kubernetes Scheduler, how it impacts the eviction order of pods by the Kubelet as well as what happens to them during node OOM events.
March 22, 2019
4 min read
In this instalment of the Kubernetes in Production blog series, we take a deep dive into monitoring Kubernetes resource metrics. We will see why monitoring resources is important for Kubernetes in production, choosing which resource metrics to monitor, setting up the tools required including Metrics-Server and Prometheus and querying metrics.
March 7, 2019
4 min read