How To Reduce EKS Costs

Dec 21st, 2022
How To Reduce EKS Costs
URL Copied

With the proliferation of micro services, containers started to enter our lives rapidly, and as a result, the use of Kubernetes to manage multiple containers became widespread. Although Kubernetes is a powerful orchestration tool, it can cause high costs if not used properly. In this article, we will take a look at what's driving EKS costs and how to optimize them.  

What is EKS?

Amazon Elastic Kubernetes Service (Amazon EKS) is a managed Kubernetes service that makes it easy for you to run Kubernetes on AWS.  It is a fully managed service and users are only responsible for the worker nodes. This means you don't have to pay attention to master node upgrades, backups, and security patches.. 

There are three ways you can run your applications on the EKS cluster. You can choose between EC2 instances, Fargate (serverless) or AWS Outposts which is an on-premise solution. 

Here's a simple architecture showing communication between the control plane and worker plane.

reduce-eks-costs

 

Kubernetes uses pods to schedule, run, and scale servers. With Amazon EKS, you can replicate master schedulers in three Availability Zones within an AWS Region to ensure high availability.

Breaking Down EKS Pricing

EKS is priced at $0.10 per hour for each cluster you create — you can use a single cluster to run multiple applications using Kubernetes namespaces and IAM security policies. If you use EKS with EC2, you'll be charged for the resources you created to run your Kubernetes worker nodes. That is the on-demand price and you will pay for what you use. 

If you choose to use EKS Fargate, you don't need to pay for provisioning and managing servers costs but pricing is based on the vCPU and memory resources used from the time you start to download your container image until the Amazon EKS pod terminates (minimum 1-minute charge). 

Also, if you want to use on-premise EKS, you can use EKS on AWS Outposts. Amazon EKS on AWS Outposts pricing is simple and works the same as it does in the cloud: you pay $0.10 per hour per cluster for the Amazon EKS service. This applies for both extended and local cluster deployment options. The Amazon EKS service fee is not included in the Outposts pricing. 

New call-to-action

Here's an example of EKS cluster pricing:

EKS service price

  • $0.10 per hour for each Amazon EKS cluster
  • Price per 30 days: $72/per cluster 

EKS with EC2 worker nodes prices

  • Choose t2.large (2 CPU, 8GB Memory) in Ireland and 100GB EBS Volume
  • Monthly cost is 62.76 USD (source)

EKS with Fargate worker nodes prices

  • AWS Fargate pricing is calculated based on the vCPU and memory resources used from the time you start to download your container image until the EKS Pod terminates.

Optimizing EKS Costs

One of the main reasons why teams see their EKS bills surge is due to overprovisioning. You can avoid this by choosing the best instance types, implementing cost monitoring and alerting strategies, and promoting a culture of financial accountability. Let's take a look at some practices you can get started with today.

Enable cluster autoscaling

Cluster autoscaling is an important feature on EKS because it allows you to scale resources depending on the load on your system.. If your system load decreases, the nodes will scale down automatically, preventing you from incurring unnecessary costs. To understand which resources will benefit most from autoscaling, you'll need a monitoring system. Finout offers you highly available monitoring and alerting systems for your Kubernetes systems like EKS, AKS and GKE. You can create custom EKS dashboards and observe the system metrics to see where autoscaling will make most sense.

Rightsize Instances

Choosing the right instance type for your cluster can net you substantial savings because, as you can see above, using EKS with EC2 means you'll also pay for EC2 resources. Rightsizing will prevent overprovisioning and underutilization issues from causing cost spikes down the road.

Use Fargate with EKS

AWS Fargate pricing is based on usage (pay-per-use). There are no upfront charges here as well. There is, however, a one-minute minimum charge. All charges are also rounded up to the nearest second. You will also be charged for any additional services you use, such as CloudWatch utilization charges and data transfer fees.

As opposed to Amazon Lambda, Fargate gives you the option to use different runtimes with EKS or ECS. It is also cheaper to execute Fargate than Lambda per hour. For more information, see our AWS Fargate vs AWS Lambda comparison.

Use Spot Instances 

You can use Spot Instances to save up to 90% off pay-per-use pricing models.. The only problem is, Spot Instances aren't suitable for fault-tolerant workloads because of potential service disruptions. You can use Spot Instances with Batch Processing Tasks, CI/CD Servers, High-Performance Computing, Big Data Analytics, and Rendering Workloads while using EKS and you can reduce the EKS costs.

Final Thoughts

Reducing your Amazon EKS costs starts with considering your application's usage, scalability requirements, and key bottlenecks, which may affect the price and performance of your instances.

With Finout, you can get complete visibility into your EKS spend (down to the pod level), making it easy to spot underutilized services and configure autoscaling where it's most needed.

Book a demo with one of our specialists to get a platform walkthrough. 

Main topics