What Is Amazon EKS?
Amazon Elastic Kubernetes Service (Amazon EKS) is a fully managed service that allows you to run Kubernetes on Amazon Web Services (AWS) without having to manage the underlying infrastructure. It is designed to simplify the process of deploying, scaling, and managing containerized applications using Kubernetes.
With Amazon EKS, you can easily create and run highly available Kubernetes clusters in multiple regions, integrate with other AWS services, and utilize the security features provided by AWS. You can use Amazon EKS to run any standard Kubernetes application, including applications that use multiple containers, complex microservices architectures, and stateful applications.
This is part of a series of articles about AWS EKS.
In this article:
- Understanding the Amazon EKS Pricing Model
- 5 Ways to Optimizing AWS EKS Cost
Understanding the Amazon EKS Pricing Model
The pricing model for Amazon EKS is based on the resources you use to run your Kubernetes cluster and the number of worker nodes you deploy in the cluster. The following are the key factors that determine the cost of using Amazon EKS:
- Control plane costs: The control plane manages the Kubernetes master nodes that run the Kubernetes API server and other essential components. You pay for the resources used by the control plane, including API requests, etcd storage, and networking. The cost is based on the number of hours your cluster runs per month, and the hourly rate depends on the region in which your cluster is deployed.
- Worker node costs: You pay for the resources used by the worker nodes that run your application containers. The cost is based on the EC2 instance type and the region in which the instance is deployed. You can choose from a range of instance types, including general-purpose, compute-optimized, memory-optimized, and GPU instances.
- Data transfer costs: You pay for the data transferred in and out of your cluster. This includes traffic between the control plane and worker nodes, as well as traffic between your cluster and other AWS services or external endpoints.
- Storage costs: You pay for the storage used by your cluster, including EBS volumes and EFS file systems.
It’s important to note that there are no upfront costs or minimum fees for using Amazon EKS. You only pay for the resources you use, and you can easily scale your cluster up or down as your needs change. Additionally, you can save costs by using Amazon EC2 Spot instances for your worker nodes or by purchasing Reserved Instances (RIs) for your EC2 instances.
EKS Fargate Pricing
Amazon EKS also provides an option to run containers without the need to manage and provision the underlying EC2 instances through Amazon EKS Fargate. The pricing for EKS Fargate is based on the vCPU and memory resources used by your containers.
You are charged based on the number of vCPUs and GBs of memory per second that your containers consume. The cost is based on the region in which your cluster is running, and the pricing tiers are broken down into three categories:
- vCPU-seconds: This is the number of seconds your containers consume CPU time
- Memory-seconds: This is the amount of memory your containers consume, measured in GB-seconds
- Networking: You are charged for data transfer in and out of your Fargate tasks, including traffic between your tasks and other AWS services, as well as traffic between tasks in different availability zones
It’s important to note that EKS Fargate pricing is separate from the Amazon EKS control plane and worker node pricing. You can choose to use Fargate with your existing EKS cluster, or you can create a new cluster with only Fargate nodes. Additionally, you can use Amazon EC2 instances and Fargate together within the same cluster, and you will only be charged for the resources you use.
AWS Outposts and EKS Anywhere Pricing
AWS Outposts and EKS Anywhere are both solutions that allow you to run AWS services on-premises or in your own data center.
This pricing model is based on the hardware and software components that are included in the Outposts rack that you purchase. The price of an Outposts rack includes the cost of the hardware, software licenses, and support. The pricing is based on a three-year commitment, and there is a minimum commitment of one rack per location.
You can choose from different configurations of compute and storage capacity, and you can add or remove capacity as needed. There are also additional charges for data transfer, storage, and other AWS services that you use with your Outposts.
This is a new offering from AWS that allows you to deploy and manage Kubernetes clusters on your own infrastructure, using the same tools and APIs that are used with Amazon EKS. The pricing for EKS Anywhere is based on a subscription model, which includes a base fee per cluster per month, plus an additional fee for each managed node that is part of the cluster.
The subscription fee includes support and maintenance for the EKS Anywhere software, as well as access to updates and new features. The price per managed node is based on the region in which the node is deployed and the type of EC2 instance that is used for the node.
It’s important to note that the pricing for AWS Outposts and EKS Anywhere can vary depending on your specific use case and requirements. You should consult with an AWS representative or use the AWS pricing calculator to estimate the cost of using these services.
5 Ways to Optimizing AWS EKS Cost
1. Terminate Pods That Are Not Needed
Kubernetes provides various tools to monitor and manage pods, such as Kubernetes Dashboard and kubectl command-line tool. You can use these tools to identify pods that are not serving any useful purpose, and then terminate them. This can help you free up resources that can be used by other pods that are actively serving your application.
2. Use Auto-Scaling
AWS EKS allows you to use Amazon EC2 auto scaling groups to automatically scale your worker nodes based on the demand for resources. You can set up auto-scaling rules based on metrics such as CPU utilization, memory utilization, or network traffic. This can help you avoid over-provisioning your resources and save on costs.
3. Control Resource Requests
Kubernetes allows you to specify resource requests and limits for each container in a pod. Resource requests are the minimum amount of resources that a container requires to run, while resource limits are the maximum amount of resources that a container can use. By setting resource requests and limits correctly, you can avoid over-provisioning resources and save on costs.
4. Use Spot Instances for Kubernetes Workloads
AWS offers Spot Instances at a discounted price compared to on-demand instances. Spot instances can be used for non-critical workloads in your Kubernetes clusters to save costs. You can use Kubernetes tolerations and node selectors to schedule pods on Spot Instances. Additionally, you can use AWS Spot Fleet to launch and manage Spot Instances in your Kubernetes clusters.
5. Use AWS Cost Allocation Tags
Cost allocation tags allow you to assign metadata to your AWS resources, including your EKS clusters and worker nodes. This can help you track your costs and identify which resources are responsible for specific costs. You can use AWS Cost Explorer or third-party tools to analyze your costs based on the tags you assign.
Ensure availability and optimize Amazon Elastic Kubernetes Service with Spot by NetApp
Spot by NetApp’s portfolio provides hands-free Kubernetes optimization. It continuously analyzes how your containers are using infrastructure, automatically scaling compute resources to maximize utilization and availability utilizing the optimal blend of spot, reserved and on-demand compute instances.
- Dramatic savings: Access spare compute capacity for up to 91% less than pay-as-you-go pricing
- Cloud-native autoscaling: Effortlessly scale compute infrastructure for both Kubernetes and legacy workloads
- High-availability SLA: Reliably leverage Spot VMs without disrupting your mission-critical workloads
Learn more about how Spot supports all your kubernetes workloads.