If you are researching the various container orchestration service offerings on AWS, you may have realized that EKS and ECS are your two options. You may have also seen Fargate as an option tied to each of these service offerings, i.e. “EKS Fargate” and “ECS Fargate”, which may have further complicated your understanding of the available container orchestration service offerings on AWS.
- EKS is the managed Kubernetes service offering provided by AWS
- ECS is an AWS-specific orchestrator managed by AWS which predates EKS
While ECS is unrelated to Kubernetes, it still allows you to schedule containers and build out user-facing services out of them.
What is AWS Fargate
Fargate is a serverless execution type for each of these services which allows you to use each service without managing the underlying EC2 instances which will perform the EKS or ECS workloads.
This essentially leads to four distinct service offerings, each with its own set of constraints and nuances. The following is a simple breakdown of these nuances which may clarify your understanding of these service offerings:
Fundamental Considerations
Consideration | EKS | EKS Fargate | ECS | ECS Fargate |
---|---|---|---|---|
Container Runtime | Docker | Containerd (as of Fargate 1.4) | Docker | Containerd (as of Fargate 1.4) |
Atomic Container Unit | Pod | Pod | Task | Task |
Windows Container Support? | Yes, with Windows EKS Clusters | No | Yes, with Windows ECS Clusters | No |
ECS and EKS Tool Ecosystem
Tool | EKS | EKS Fargate | ECS | ECS Fargate |
---|---|---|---|---|
Configuration Management | – Helm – Kustomize – Raw k8s manifests | – CloudFormation – Terraform | ||
Centralized Logging Solution | Any centralized logging solution that can be achieved on Kubernetes (for example Fluentd running as a k8s DaemonSet as part of an EFK Stack) | – Amazon CloudWatch – Amazon Elasticsearch Service – Amazon Kinesis Data Firehose – AWS for Fluent Bit Outputs | ||
Time Series Metrics | – Any monitoring solution that can be achieved on Kubernetes (for example Grafana and Prometheus) CloudWatch – Prometheus Metrics via CloudWatch Container Insights | Any monitoring solution that can be achieved on Kubernetes without the use of DaemonSets (for example Grafana and Prometheus, but not CloudWatch Container Insights) | CloudWatch Prometheus Metrics via CloudWatch Container Insights | |
Integration with ECR | Native integration with AWS ECR via IAM Policies | |||
Integration with other Container Image Registries | Authentication with external Container Image Registries via k8s Secret objects, which are encrypted via AWS KMS |
IAM and Networking
Out of Box Functionality | EKS | EKS Fargate | ECS | ECS Fargate |
---|---|---|---|---|
AWS IAM | – Cluster IAM role – Node IAM role – IAM-Role-backed Kubernetes Service Account | Pod execution role | – Amazon ECS task execution IAM role – Amazon ECS Container Instance IAM Role | Amazon ECS task execution IAM role |
Networking | Amazon VPC Container Network Interface (CNI) | awsvpc — ENI allocated to each k8s Pod | – awsvpc — ENI allocated to each ECS Task– bridge — Uses EC2 instances’ Docker host networking– host — Uses EC2 instance’s ENI– none — The task has no external network connectivity | awsvpc — ENI allocated to each ECS Task |
Pricing (us-east-1 as of January 2021)
Billable | EKS | EKS Fargate | ECS | ECS Fargate |
---|---|---|---|---|
Control Plane | $0.10 / hour | $0.10 / hour | None | None |
CPU Time | EC2 instance pricing | $0.04048 / vCPU / hour | EC2 instance pricing | $0.04048 / vCPU / hour |
Memory | EC2 instance pricing | $0.004445 / GB / hour | EC2 instance pricing | $0.004445 / GB / hour |
Other Considerations
Consideration | EKS | EKS Fargate | ECS | ECS Fargate |
---|---|---|---|---|
Control Plane SLA | 99.95% | 99.95% | 99.99% | 99.99% |
SLA Financially-backed? | Yes | Yes | Yes | Yes |
On-prem Support (AWS Outposts)? | Yes | No | Yes | No |
Are You Ready for a DevOps Transformation?
While software continues to eat the world at an ever-increasing pace with DevOps, the challenges and struggles of companies implementing DevOps is very real. We all can overcome these challenges by working together, improving our tools, processes, knowledge and training our workforce.
Indellient is a Software Development Company that specializes in Data Analytics, Cloud Development, Managed IT Solutions, DevOps Services, and Document Process Automation.