Calculating the total cost of ownership (TCO) for Kubernetes requires identifying all major expenses, including infrastructure costs, personnel costs, and potential cloud provider fees. With a clear picture of TCO, you can make a more informed decision when choosing between self-managed (self-hosted) Kubernetes and a managed Kubernetes provider. The TCOs of the two approaches are significantly different, and this article will show you exactly how and why.
TCO Comparison Summary
The table below shows the key aspects of the TCO comparison between self-managed Kubernetes and managed Kubernetes providers. It compares infrastructure expenses, including provider fees, and an engineerâs salary.
For this comparison, weâll assume that a company would need only one DevOps engineer for managed Kubernetes, whereas companies opting for self-hosted Kubernetes would need three. Weâll look at rented cloud VMs for self-hosted, and out-of-the-box K8s clusters for managed Kubernetesâtwo standard scenarios for a fair comparison. For both scenarios, the infrastructure costs shown in the table are the average when considering AWS, Azure, Google Cloud, and Gcore.
Infrastructure | Engineersâ salary | Total annual cost | |
Self-hosted Kubernetes | $13,737.64 | $321,500 | $335,238 |
Managed Kubernetes | $6,157.8 | $107,167 | $113,325 |
As you can see, the TCO of self-hosted Kubernetes is almost three times higher than that of managed Kubernetes. Letâs explore the reasons for this major cost discrepancy.
Infrastructure Cost Comparison
Kubernetes is a free software. But to run it, you have to rent or buy infrastructure, such as VMs or physical servers. The way you do so differs depending on whether you opt for self-hosted or managed Kubernetes. To understand infrastructure costs, we need to take a closer look at each method in turn and explore the components required.
Self-hosted Kubernetes
If you choose to run K8s independently, youâll need to rent VMs for the Kubernetes master node (the control plane) and worker nodes. Letâs consider a production-grade cluster consisting of the following:
- 3 VMs for the control plane, required for fault tolerance
- 2 VMs for the worker nodes
For simplicity, we choose VMs with a configuration suitable for an average web project: 8 vCPU, 16 GB RAM, and 75 GB SSD.
Here is the pricing* offered by four cloud providers for VMs available in the US:
Provider | VM types and resources | Total annual cost of five VMs |
AWS | c6g.2xlargeâ8 vCPU, 16 GB RAM, 75 GB SSD | $12,273.6 |
Azure | A8 v2 seriesâ8 vCPU, 16 GB RAM, 64 GB SSD** | $17,764.2 |
Google Cloud | N1 seriesâ8 vCPU, 16 GB RAM, 75 GB SSD | $16,721.33 |
Gcore | g1 standard seriesâ8 vCPU, 16 GB RAM, 75 GB SSD | $8,191.42 |
Average | $13,737.64 | |
* Prices are for on-demand VMs; no commitment; no VAT; ingress traffic is not included. ** Azure only offers fixed volume sizes for built-in storage. |
Managed Kubernetes
With managed K8s, you donât have to worry about renting separate VMs and setting up the Kubernetes software. You choose the VM configurations for your worker nodes, and a provider prepares them for you. The result is an out-of-the-box Kubernetes cluster.
Sometimes, you also have to consider fees for control plane management (fixed) and egress traffic (consumption-based). Providers like AWS, Google Cloud, and Azure charge for this, while othersâlike Gcoreâdonât.
Here are the prices* offered by four cloud providers for similar cluster configurations in the US:
Provider | Control plane management | Cluster of two worker nodes | Total annual cost | |
Configuration | Annual cost | |||
Amazon EKS | $876 | 8 vCPU, 16 GB RAM, 75 GB SSD | $4,909.44 | $5,785.44 |
AKS (Azure) | $876 | 8 vCPU, 16 GB RAM, 64 GB SSD** | $7,048.08 | $7,924.08 |
GKE (Google) | $876 | X vCPUs, X GB RAM | $6,832.08 | $7,708.08 |
Gcore Managed Kubernetes | 0 | 8 vCPU, 16 GB RAM, 75 GB SSD | $3,213.6 | $3,213.6 |
Average | $6,157.8 | |||
* Prices are for on-demand VMs; no commitment; no VAT; ingress traffic is not included. ** Azure only offers fixed volume sizes for built-in storage. |
Engineer Cost Comparison
To maintain a production-grade cluster for an average web project, you need:
- For a self-hosted K8s clusterâ3 DevOps engineers
- For a managed K8s clusterâ1 DevOps engineer
To learn more about the technical reasons behind these calculations, read our article on the difference between managed and self-managed Kubernetes.
According to Glassdoor, the median salary for a DevOps engineer is as follows:
DevOps salary in the US | DevOps salary in Germany | Average annual salary | |
Self-hosted Kubernetes (3 engineers) | $420,000 | $222,999 | $321,500 |
Managed Kubernetes (1 engineer) | $140,000 | $74,333 | $107,167 |
Final Comparison
Here is the final TCO comparison between self-managed Kubernetes and managed Kubernetes providers:
Providers | Infrastructure | Engineersâ salary | Total annual cost | |
By provider | Average | |||
Self-hosted Kubernetes | ||||
AWS | $12,273.6 | $13,737.64 | $321,500 | $335,238 |
Azure | $17,764.2 | |||
GCP | $16,721.33 | |||
Gcore | $8,191.42 | |||
Managed Kubernetes | ||||
Amazon EKS | $5,785.44 | $6,157.8 | $107,167 | $113,325 |
AKS (Azure) | $7,924.08 | |||
GKE (Google) | $7,708.08 | |||
Gcore Managed Kubernetes | $3,213,6 |
Summing Up
Please note that these approximate calculation probably arenât exactly what youâll experience. The actual numbers will depend on many factors, including:
- Size and complexity of your project
- Location where you hire engineers and deploy a K8s cluster
- Choice of provider
- How you consume and scale computing resources
However, the difference between the TCO of the two methods is relevant to what we got above: the total cost of ownership of self-managed Kubernetes is about three times higher than that of managed Kubernetes.
The main reason is that Managed Kubernetes means a provider handles many of the most complex operations. This includes managing the underlying infrastructure and control plane, regular and security upgrades, monitoring, scaling the cluster, and, critical to production, high availability guaranteed by an SLA. With self-hosted K8s, you have to do that yourself, which means a larger infrastructure, larger team size, and higher salary costs.
Conclusion
Understanding the TCO difference between self-managed Kubernetes and a managed Kubernetes provider can help you choose a solution that is more suitable for your team and meets your budget. Kubernetes cost analysis can also help you identify areas for optimization, such as right-sizing your infrastructure or optimizing workloads for better resource utilization. However, the TCO isnât the only aspect of choosing how to run Kubernetes: you should also consider things like the setup and maintenance responsibilities, as well as your project requirements.
If youâre looking for reliable, high-performance, and scalable Kubernetes clusters, try Gcore Managed Kubernetes. We offer free cluster management with a 99.9% SLA, bare metal and GPU support for worker nodes, and free egress traffic.