ECS, Fargate, ECR, EKS Flashcards
What does the elastic container service do?
What must you do for ECS?
What does AWS take care of?
Launches docker containers on AWS.
You must provision and maintain the infrastructure (the EC2 instances).
AWS takes care of starting an stopping the containers.
What is fargate?
It’s like the elastic container service except you don’t need to worry about managing EC2 instances. Fargate will provision the services that you need.
What is the importance of the EC2 Instance Profile?
What is an ECS Task Role?
It is used by the ECS agent to make API calls to the ECS service, send container logs to cloud watch, pull docker images from ECR and reference sensitive data in Secrets Manager or SSM Parameter store.
It allows each task to have a specific role. With this you can set different roles for different tasks. Ex only task A can access your S3 bucket.
How can you share data between tasks?
What would be the usecase for this?
By mounting an NFS.
To have persistent multi-AZ shared storage for your containers.
Which ports do the containers expose?
Does the load balancer know which port to connect to. This is called Dynamic port mapping.
What must you do to allow your your ALB to connect to the containers?
Random ports
It has the abiliity to figure it out.
You must configure the security group of the instances to allow any port from the ALB
How does load balancing work for Fargate?
For each fargate task has its own ENI/IP. Because of this each ENI can expose the same port. Ex port 80. All you need to do is configure the Fargat security group to allow connections to the task port from the ALB.
How can you trigger a task for Fargate?
You can configure the Amazon Event Bridge to have a “Run ECS Task Rule. When the event bridge receives an event, it will trigger the task to start.
How can you auto-scale in ECS?
Other than CPU usage, what is another metric that can be used to scale ECS tasks?
How many levels of scaling are there in ECS?
You can set up a cloud watch metrics based on the overall CPU usage of a service. When the metric goes over a certain point, it should trigger an alarm that will automatically deploy another task.
However, if you’re using EC2 instances, you may need to scale the whole cluster instead by scaling the ECS capacity providers.
You could set a metric based on the length of a queue,. If the length exceeds a certain size, then an alarm can be triggered and the tasks can be scaled.
What must you define for a rolling updates in ECS?
How does a rolling update work?
A minimum healthy percent and a maximum percent?
Let’s say you have 4 task running with a minimum healthy percent of 50%. ECS would kill 2 instances of v1 and start 2 instances of v2, then kill the other two instances of v1 and all two new instances of v2.
What is Amazon Elastic Container Registry (ECR)?
Used to store, manage and deploy containers on AWS. You pay for what you use.
What is EKS?
What are the use-cases for EKS?
What does EKS use instead of tasks?
The elastic Kubernetes service.
EKS is cloud agnostic so, if you’re already using kubernetes to for your on prem infrastructure or on another cloud, deploying to kubernestes hosted on AWS should be easier.
Pods