AWS Kubernetes Pricing & EKS Best Cost Optimization Tips

Understanding AWS Kubernetes pricing before we conclude on your requirement is an important aspect. There are multiple configuration options and support services available that one can deploy and consume.

So, your EKS cost depends on the way you configure the service and the support services. Sometimes EKS pricing becomes complex based on the solution required to fulfill your need.

We will list the key elements of AWS EKS pricing and related factors, and we will also see the support services pricing components required to have a complete view. At the end, we will also go through the EKS cost optimization tips.

Options For Kubernetes Service On Amazon Cloud

You can have two options to run Kubernetes on Amazon Cloud AWS.

  • Amazon EKS with Amazon EC2
  • Amazon EKS with AWS Fargate

Let’s look at the different pricing factors involved when you consume AWS EKS.

Amazon EKS with Amazon EC2 – Pricing

AWS Kubernetes Pricing Factors

There are three major components of Amazon Elastic Kubernetes Service.

  1. EKS Cluster (Control Plane)
  2. Worker Nodes
  3. Networking

EKS Cluster (Control Plane) Pricing:

Now to run Kubernetes you will need the control plane and the good news is that AWS manages this for you including availability and scalability, so you need to pay for the service.

You will be charged a flat $0.10 per hour for the EKS cluster’s control plane running.

This will be charged to you as soon as you create your cluster and till such time you don’t drop it.

1 Clusters x 0.10 USD per hour x 730 hours per month = 73.00 USD /Month

Region: US East (Ohio)

Amazon EKS Control Plane Pricing
Amazon EKS Control Plane Pricing

Worker Node Pricing:

You can have a verity of choices to configure the worker-node and it is the most variable pricing factor. You have the option to select the EC2 instance that is most suitable for your technical needs.

So, first is your EC2 instance cost and then you will also need the storage with these instances. Now you will have the compute cost and the associated storage cost.

For EC2 hourly rates can range from a few cents to several dollars per hour, it will changed based on the instance type.

Now while choosing your EC2 instances you can either have On-Demand instances or Spot Instances option too. Keeping in mind, that AWS can terminate spot instances when they need the capacity back, it is a good choice for cost reduction. The non-critical test/dev instances can run on these types where you have no data to lose.

When you want to run the production instances and have features like Autoscaling, the cost will vary. Based on the number of nodes added or removed to your cluster you will be charged for the EC2 instance’s actual usage.

AWS Pricing

Network Pricing:

Once you have computing and storage you will need networking service and this is again a cost consideration factor. When you are doing so you will at least need a Data Transfer and Load Balancers service to run your AWS Kubernetes cluster.

When your data traffic flows outside the VPC you will be charged for the data transfer costs, this is again based on the data transfer to the internet or other AWS regions.

If you decide to use AWS ELB (Elastic Load Balancers), or Network Load Balancers (NLB) or Application Load Balancers (ALB) as part of your technical solution, you will have additional costs for this usage. This is based on the service’s active hours and associated data transfer.

Amazon EKS with AWS Fargate – Pricing

Forgate is a serverless container management service offered by AWS. You do not require an EC2 instance when you consume the AWS Forgate service to run your container management service. Also, the EKS with AWS Fargate pricing is simple to understand.

There are three major components

  1. Control Plane
  2. Fargate (Worker Cluster)
  3. Networking

Control Plane Pricing:

Again, like the first option, you will have a fixed hourly rate for the control plane.

You will be charged a flat $0.10 per hour for the EKS cluster’s control plane running.

Fargate (Worker Cluster)Pricing:

While using AWS Fargate for EKS you will have vCPU and GB of memory allocated to your containers. Now based on the number of vCPU and per GB of memory allocated, you will be charged for resources your containers use, with a minimum charge per pod.

Networking Pricing:

Like the first option based on the data transfer and other services you use, you will be charged for those services additionally.

AWS EKS Cost Optimization Tips

  • Delete Pods that are not required

Monitor your Pods and terminate them when no longer needed, this will help you to reduce your AWS EKS costs.

  • Use of Auto-Scaling

By using EC2 auto-scaling groups within your AWS EKS you can dynamically increase/reduce the number of worker nodes in your cluster. This will save you money as not-in-use workloads will be removed and nodes will be reduced in numbers.

  • Consider consuming spot instances

You can deploy non critical workloads (test/dev) on Spot Instances instead of on-demand instances within your EKS clusters and reduce your EKS cost.

  • Implementation of AWS Cost Allocation Tags

You can track AWS resources using tags and this will help you to identify areas of improvement and you can avoid overspending.

  • Optimize Storage Costs

You can use lifecycle policies for Elastic Block Store EBS volumes, by doing so you can optimize the storage required for Docker images.

  • Reserved Instances

Based on your utilization pattern for a predictable workload with a long-term commitment, you can have AWS Reserved Instances configured for your EKS cluster that offers substantial discounts compared to on-demand instances

Conclusion:

Understanding the AWS Kubernetes pricing is the first step in cost reduction. Congratulations, now that you have taken the first step go ahead and identify some of the relevant tips for your environment and implement them.

Remember every small saving will contribute, so do not ignore any suggestion/tip which is relevant to your setup/environment. Let us know your thoughts on EKS cost optimization in the comment section below.

Leave a Comment