Docker & EKS Flashcards
What is EKS?
Amazon Elastic Kubernetes Service
What is ECS?
Amazon Elastic Container Service
What is AWS Fargate?
Amazon’s own serverless container platform, works with both ECS and EKS
Explain ECS with EC2 launch type
You can use EC2 instances to form an ECS cluster, the instances will have an ECS Agent. AWS takes care of starting/stopping containers. You must manage the infa (EC2 instances) yourself.
Explain ECS with Fargate launch type
AWS managed cluster, infa is managed by AWS
Explain the ECS IAM role for EC2 Instance Profile
Used by the ECS agent, makes API calls to ECS server, send container logs to CloudWatch, pull container images, reference secrets
Explain the ECS Task Role
Allows each ECS Task to have a specific role, to grant and control access to AWS services e.g. S3 or RDS
Can you mount an S3 bucket as a file system in an ECS task?
No but you can use EFS
Are ECS IAM roles defined at the service or task definition level?
Task definition level (a service is an instance of a task)
What is ECS Task Placement?
Determines where a task should run or what task should be terminated. Task placement strategies and constraints can be used to assist with this. Only for ECS with EC2 not Fargate.
Can you use ECS Task Placement with ECS Fargate?
No it is only applicable to EC2 backed ECS
What are the main ECS task placement strategies?
Binpack - places tasks based on the least available amount of CPU or memory to minimise number of instances and costs. Random - place tasks randomly. Spread - place task evenly based on an attribute e.g. availability zone.
What are the placement constraints?
distinctInstance - place each task on a different instance. memberOf - place task on instances that satisfies an expression e.g. instance type must be t2.micro or t2.* etc