Containers and Images
A container is a standardized unit of software development that contains everything that your software application needs to run, including relevant code, runtime, system tools, and system libraries. Containers are created from a read-only template called an image.
Images are typically built from a Dockerfile. After being built, these images are stored in a registry where they then can be downloaded and run on your cluster.
Container Agent
The container agent runs on each container instance within an Amazon ECS cluster. The agent sends information about the resource's current running tasks and resource utilization to Amazon ECS. It starts and stops tasks whenever it receives a request from Amazon ECS.
Amazon Elastic Container Service (Amazon ECS)
Amazon Elastic Container Service (Amazon ECS) is a highly scalable, fast container management service that makes it easy to run, stop, and manage containers on a cluster. Your containers are defined in a task definition that you use to run individual tasks or tasks within a service. In this context, a service is a configuration that enables you to run and maintain a specified number of tasks simultaneously in a cluster. You can schedule the placement of your containers across your cluster based on your resource needs, isolation policies, and availability requirements.
Consists of three part: scheduling and orchestration, cluster manager, placement engine
- Serverless infrastructure
- Built-in security
- Spot instances
- AWS Integration
Task
Task definition
To prepare your application to run on Amazon ECS, you must create a task definition. The task definition is a text file (in JSON format) that describes one or more containers (up to a maximum of ten) that form your application. It specifies various parameters for your application.
Task Scheduling
The Amazon ECS task scheduler is responsible for placing tasks within your cluster.
Cluster
An Amazon ECS cluster is a logical grouping of tasks or services.
When your tasks are run on Fargate, your cluster resources are also managed by Fargate.
Clusters are Region-specific.
Cluster Status
- Active: The cluster is ready to accept tasks and, if applicable, you can register container instances with the cluster.
- Provisioning: The cluster has capacity providers associated with it and the resources needed for the capacity provider are being created.
- Deprovisioning: The cluster has capacity providers associated with it and the resources needed for the capacity provider are being deleted.
- Failed: The cluster has capacity providers associated with it and the resources needed for the capacity provider have failed to create.
-
Inactive: The cluster has been deleted. You should not rely on
Inactive
clusters persisting.
AWS Elastic Kubernets Service (EKS)
Amazon helps you handle your master node
Amazon provides on-demand zero downtime, and applies the latest upgrades and patches
POD - Task
node groups -workers
AWS Fargate
AWS Fargate is a serverless compute engine for containers that works with both Amazon Elastic Container Service (ECS) and Amazon Elastic Kubernetes Service (EKS).
AWS Fargate enables you to focus on your applications. You define your application content, networking, storage, and scaling requirements. There is no provisioning, patching, cluster capacity management, or any infrastructure management required.
This removes the need to choose server types, decide when to scale your clusters, or optimize cluster packing.
EKS + Fargate not support Spot Instances.
Amazon Elastic Container Registry (ECR)
Amazon hosted elastic container hub encrypted at rest.
Highly scalable and available.