DEV Community

Understanding Execution Units in Amazon EKS with Fargate

Amazon EKS with Fargate provides a fully managed, serverless compute engine for containers, but it's essential to understand the core execution model. The smallest unit of execution in EKS is a pod, not a container, and all workloads are scheduled at the pod level. A pod can contain one or more containers that share the same network namespace, volumes, and start and stop together. In Fargate, you cannot run a container by itself; it must be inside a pod. When you deploy a Kubernetes application, Kubernetes converts it into a desired pod template, which is then matched with a Fargate profile and launched as a lightweight VM. The execution hierarchy in EKS Fargate mode consists of containers, pods, deployments, namespaces, and clusters. Fargate fully supports multi-container pods, including sidecars and init containers, which can be used for logging, service mesh proxies, and monitoring. However, Fargate imposes some limitations, such as no support for DaemonSets, host-level access, or EBS volumes. Understanding that the pod is the minimum execution unit is crucial for designing better Kubernetes manifests, debugging effectively, and configuring IAM, networking, and observability correctly. This knowledge is foundational for building production-ready applications on EKS with Fargate.
favicon
dev.to
dev.to
Create attached notes ...