Containers on AWS Overview: ECS | EKS | Fargate | ECR

TechWorld with Nana
29 Nov 202025:10

Summary

TLDRThis video provides a high-level overview of container services on AWS, discussing ECS (Elastic Container Service), EKS (Elastic Kubernetes Service), EC2, AWS Fargate, and ECR (Elastic Container Registry). It explores how each service manages containerized applications, comparing ECS and EKS in terms of flexibility, orchestration, and scalability. It also covers AWS Fargate’s serverless infrastructure management and how ECR integrates with other AWS services. The video is designed to help users choose the right AWS container service based on their application requirements and infrastructure needs.

Takeaways

  • 🚢 AWS offers multiple container services depending on application requirements, including ECS, EKS, EC2, Fargate, and ECR.
  • 📦 ECS (Elastic Container Service) is a container orchestration service that manages the lifecycle of containers, including scheduling, restarting, and load balancing.
  • 🔄 EC2 instances with Docker installed can host containers, but require manual management of infrastructure, including operating systems and resource allocation.
  • ⚙️ Fargate provides a serverless way to run containers on AWS, automatically provisioning the necessary infrastructure for each container and scaling resources as needed.
  • 💸 Fargate offers a cost-efficient option since users only pay for the resources consumed by the containers, unlike EC2 where you pay for the entire server.
  • 🔧 EKS (Elastic Kubernetes Service) allows users to run Kubernetes clusters on AWS, giving them the flexibility to manage infrastructure with Kubernetes tools and easily migrate clusters to other platforms if necessary.
  • ☁️ ECS is ideal for simpler applications, while EKS is more suitable for complex applications that require Kubernetes and its ecosystem of plugins and tools.
  • 🌍 AWS services, including CloudWatch, ELB, IAM, and VPC, integrate well with ECS, EKS, and Fargate, providing robust options for monitoring, networking, and permissions.
  • 🔑 ECR (Elastic Container Registry) is a container image repository that integrates with AWS services, making it easier to manage Docker images and automate deployment workflows.
  • 🚀 AWS infrastructure management with ECS, EKS, Fargate, and ECR simplifies the deployment and scaling of containerized applications, with various options depending on the level of control and automation needed.

Q & A

  • What is Amazon ECS, and how does it help manage containers?

    -Amazon ECS (Elastic Container Service) is a container orchestration service that manages the lifecycle of containers, including scheduling, load balancing, and restarting them. It helps manage container clusters by automating processes and reducing manual efforts when dealing with large numbers of containers.

  • What are the advantages of using AWS Fargate compared to EC2 instances in ECS?

    -AWS Fargate is a serverless way to run containers without provisioning or managing EC2 instances. It automatically provisions server resources based on container needs and scales on demand, reducing costs by only charging for the resources used. Unlike EC2, where you manage the servers, Fargate handles the infrastructure, simplifying operations.

  • How does Kubernetes differ from ECS in terms of portability and ecosystem tools?

    -Kubernetes (EKS) is an open-source container orchestration tool that can be used across multiple platforms, not just AWS, making it more portable than ECS. EKS allows users to access Kubernetes' wide range of plugins and tools, such as Helm, while ECS is more tightly integrated with AWS-specific services and does not offer the same portability.

  • What role does ECR play in AWS container services?

    -ECR (Elastic Container Registry) is a container image repository service that integrates with other AWS services like ECS and EKS. It serves as a private registry for Docker images and simplifies the process of pushing, pulling, and managing container images. It also offers features like automated image updates within AWS container clusters.

  • What is the difference between fully managed and semi-managed EC2 instances in EKS?

    -Fully managed EC2 instances are managed entirely by AWS, where AWS handles the provisioning and management of the worker nodes. In semi-managed EC2 instances, users still need to manage the operating system, runtime, and scaling configurations. Node groups help simplify some management tasks, but auto-scaling and other configurations remain the user's responsibility.

  • How does Fargate work with Kubernetes (EKS) compared to ECS?

    -Fargate can be used with both ECS and EKS to eliminate the need to manage EC2 instances. In both services, Fargate automatically provisions resources for each container. For EKS, it allows for fully managed Kubernetes worker nodes, offering the same benefits of not having to manage infrastructure as it does with ECS.

  • When should you choose ECS over EKS for container orchestration on AWS?

    -ECS is best suited for less complex containerized applications that don't require the full feature set of Kubernetes. It offers deep integration with AWS services and is generally easier to set up for simpler tasks. EKS is ideal when you need portability, are already using Kubernetes, or require the advanced features of the Kubernetes ecosystem.

  • What are the cost differences between using EC2 and Fargate for container hosting?

    -With EC2, you pay for the entire server, even if you are not fully utilizing it. With Fargate, you only pay for the CPU, memory, and storage resources that your containers consume, making it a more cost-efficient option when scaling or handling dynamic workloads.

  • What are the main benefits of using AWS Fargate for containerized applications?

    -Fargate simplifies operations by automating the provisioning and scaling of resources needed to run containers, allowing developers to focus on their applications rather than managing infrastructure. It ensures that you only pay for the resources consumed, and it scales automatically to match container demand.

  • How does ECS handle container scheduling and resource management?

    -In ECS, the control plane manages container scheduling and ensures that containers are allocated to EC2 instances with sufficient resources. The ECS control plane automates the distribution of containers across available instances and can restart failed containers, reschedule them, or manage replicas as needed.

Outlines

00:00

🚀 Overview of AWS Container Services

This introduction gives a high-level overview of container services available on AWS. It explores various options for running containerized applications, such as ECS (Elastic Container Service), EKS (Elastic Kubernetes Service), and Fargate. The video aims to help developers choose the right service for their microservice architecture by comparing these services and explaining their features.

05:02

⚙️ Managing Containers on EC2 with ECS

This section dives into managing containerized applications with ECS on EC2 instances. It outlines how microservices can lead to an increasing number of containers, and the complexities of managing resources, scheduling, and monitoring containers across a distributed infrastructure. The need for container orchestration tools like Kubernetes, Docker Swarm, and AWS ECS is highlighted as a way to automate container management tasks.

10:03

🔄 Introduction to Fargate for Serverless Containers

This paragraph explains AWS Fargate, a serverless alternative to EC2 for running containers. Fargate automatically provisions the required resources (CPU, memory, etc.) for running a container without needing to manage virtual machines. This service scales effortlessly, and users only pay for the resources consumed by their containers, making it a flexible and cost-effective solution compared to traditional EC2-based deployment.

15:04

📊 Cost Efficiency and Scaling with Fargate

Fargate offers advantages in terms of cost efficiency and scalability. Unlike EC2, where users pay for entire servers, Fargate charges only for the exact resources consumed by each container. The automatic scaling of infrastructure ensures users only allocate the necessary resources for running their applications, reducing waste and operational overhead.

20:06

🔗 EKS: Using Kubernetes on AWS

EKS allows developers to manage Kubernetes clusters on AWS infrastructure. This section compares EKS to ECS, noting that EKS supports Kubernetes’ portability across platforms. While ECS is AWS-specific, EKS enables easier migration to other cloud providers or on-premise environments, making it a flexible choice for Kubernetes users looking to avoid vendor lock-in.

⚡ Differences Between EKS and ECS

While ECS integrates tightly with the AWS ecosystem, EKS supports Kubernetes’ broader toolset and allows easier migration. EKS gives access to Kubernetes’ vast array of tools, plugins, and third-party integrations, while ECS might be better for simpler applications. It also touches on the replication and backup features of Kubernetes master nodes managed by AWS.

🖥️ EKS Cluster Configuration and Worker Nodes

EKS provisions and manages Kubernetes master nodes across multiple availability zones. Users create worker nodes using EC2 instances, which are grouped in node groups to simplify management. The section discusses the semi-managed node group option, allowing users to automate some of the worker node setup while still managing aspects like auto-scaling manually.

🛠️ Options for Worker Node Management

This part explains the options for managing worker nodes in EKS: fully managed Fargate instances, semi-managed EC2 instances through node groups, or fully self-managed EC2 instances. It encourages the use of node groups to streamline operations and provides the flexibility to combine EC2 and Fargate within the same EKS cluster for greater control.

📦 Elastic Container Registry (ECR) Overview

ECR (Elastic Container Registry) is introduced as AWS’s solution for storing container images, functioning as an alternative to Docker Hub. Its tight integration with other AWS services, such as ECS and EKS, allows for seamless updates, image management, and deployment workflows within the AWS ecosystem.

🔄 Combining AWS Services for Container Management

This final part summarizes the three key container services on AWS: ECR for image storage, ECS for orchestration, and EKS for Kubernetes management. It emphasizes the ability to integrate these services into a CI/CD pipeline to streamline building, pushing, and deploying containers in an automated fashion.

Mindmap

Keywords

💡Elastic Container Service (ECS)

ECS is a container orchestration service provided by AWS that helps manage the lifecycle of containers. It allows users to automate tasks like starting, stopping, and scaling containers, making it easier to run containerized applications. In the video, ECS is described as a key service that allows users to manage containers running on EC2 instances, delegating container management tasks to AWS while still requiring users to manage the infrastructure.

💡Elastic Kubernetes Service (EKS)

EKS is AWS’s managed service for running Kubernetes, an open-source container orchestration platform. The video explains that EKS allows users who prefer Kubernetes to manage their container clusters on AWS infrastructure. A significant benefit of using EKS is the ability to migrate workloads more easily to other platforms, as Kubernetes is not exclusive to AWS.

💡Amazon EC2

Amazon EC2 refers to the virtual machines (instances) provided by AWS to run workloads, including containers. The video discusses how EC2 instances are used to host and run containers in both ECS and EKS setups, requiring users to manage aspects like operating systems and available resources for scheduling containers.

💡AWS Fargate

Fargate is a serverless option for running containers without having to provision or manage EC2 instances. The video emphasizes that Fargate simplifies container deployment by automatically provisioning the necessary server resources based on container requirements, allowing users to focus solely on managing their application without worrying about the underlying infrastructure.

💡Elastic Container Registry (ECR)

ECR is AWS's managed container image registry, which stores and retrieves Docker images. In the video, ECR is described as a repository that integrates with other AWS services like ECS and EKS, simplifying the deployment process by allowing seamless access to container images for AWS-based container services.

💡Container Orchestration

Container orchestration refers to the automated management of containerized applications, including deployment, scaling, networking, and lifecycle management. The video focuses on the role of ECS and EKS as container orchestrators that automate the running of containers across EC2 instances or through Fargate.

💡Microservices

Microservices are an architectural style where applications are composed of small, independent services, each running in its own container. The video highlights microservices as a typical use case for container services like ECS and EKS, where different containers are deployed for various parts of a microservices application, requiring orchestration and scaling.

💡Control Plane

The control plane is the part of a container orchestration system responsible for managing container deployments, scheduling, and scaling. The video explains that in both ECS and EKS, AWS provides a control plane that users interact with to manage their containerized applications, while AWS manages the control plane infrastructure.

💡Kubernetes

Kubernetes is a popular open-source platform for automating the deployment, scaling, and operation of containerized applications. The video contrasts AWS’s ECS service with Kubernetes-based EKS, explaining that Kubernetes is widely used across different platforms and offers flexibility and portability, which is beneficial for users who may want to migrate away from AWS.

💡Serverless

Serverless computing allows users to run applications without managing the underlying infrastructure. In the video, AWS Fargate is described as a serverless option for running containers, where users don't have to provision or manage EC2 instances, and AWS automatically allocates the necessary compute resources for containers.

Highlights

AWS offers multiple container services depending on application requirements, including ECS (Elastic Container Service), EKS (Elastic Kubernetes Service), and AWS Fargate.

ECS is a container orchestration tool that manages the entire container lifecycle, such as scheduling, restarting, and load balancing.

When using ECS with EC2 instances, users must still manage the underlying virtual machines, including provisioning, operating systems, and Docker runtime.

AWS Fargate provides a serverless option for running containers, automatically provisioning resources without the need to manage EC2 instances.

Fargate only charges for the resources that containers consume, offering better scalability and cost management compared to pre-provisioned EC2 instances.

EKS allows users to deploy Kubernetes clusters on AWS infrastructure, offering the flexibility of using Kubernetes, a more popular container orchestration tool.

One advantage of EKS over ECS is that Kubernetes is platform-agnostic, making it easier to migrate workloads across different platforms or on-premise infrastructure.

While EKS manages Kubernetes master nodes, users still need to manage worker nodes, though AWS offers semi-managed EC2 node groups to simplify this process.

Fargate can also be used with EKS to manage worker nodes, offering a fully managed infrastructure solution for Kubernetes clusters.

AWS Fargate eliminates the need to manually scale EC2 instances and provides on-demand scaling based on container needs.

Elastic Container Registry (ECR) integrates with ECS and EKS, serving as a private repository for container images, offering features like automatic image updates.

ECR simplifies container management by tightly integrating with other AWS services, allowing seamless interaction with the AWS ecosystem.

ECR supports versioning and tagging of container images, making it easier to manage different application versions and stages of development.

AWS offers extensive integration with services like CloudWatch for monitoring, Elastic Load Balancer for traffic distribution, and IAM for security when using containers.

EKS supports Kubernetes tools and plugins, such as Helm, enhancing the Kubernetes ecosystem with rich functionality for managing containerized applications.

Transcripts

play00:00

in this video i will give you a high

play00:02

level overview of all the different

play00:05

container services you can use on aws

play00:08

so if you want to run a containerized

play00:11

application on aws you have multiple

play00:14

options to choose from depending on your

play00:16

application requirements

play00:18

so we'll go through all of these options

play00:20

one by one we will see what ecs elastic

play00:24

container service is and what it's used

play00:27

for

play00:28

then we'll compare it and talk about eks

play00:31

which is elastic kubernetes service

play00:33

we will also see different ways of

play00:36

running containers with ec2 or aws far

play00:40

gate and finally we will see the ecr

play00:43

service which stands for elastic

play00:46

container registry

play00:51

now think about a micro service

play00:54

application scenario

play00:56

if you're developing microservices

play00:59

you would need containers for each and

play01:01

containers scale pretty quickly

play01:04

maybe you create replicas you have

play01:07

different third-party

play01:09

services and applications for your micro

play01:11

service application this could be

play01:13

messaging systems authentication

play01:16

services etc so you end up with a bunch

play01:20

of containers

play01:21

that you need to deploy on some

play01:24

environment in this case we're talking

play01:26

about aws virtual service

play01:29

so let's say we have created

play01:32

10 containers for each our 10 micro

play01:34

services plus we have five other

play01:37

containers that our micro services use

play01:40

which run different applications and

play01:43

let's say we deploy all of those

play01:45

on our ec2 instances

play01:48

which have docker installed on them now

play01:51

once you have deployed them how do you

play01:53

manage them so you have an

play01:54

infrastructure of all these virtual

play01:56

servers that are running all your docker

play01:58

containers how do you know how much

play02:00

resources you still have remaining on

play02:03

these machines how do you know where to

play02:05

schedule the next container how do you

play02:07

know by looking across your

play02:09

infrastructure whether some of your

play02:12

docker containers are not running

play02:13

anymore whether servers ran out of

play02:16

resources and

play02:18

when you see that some containers have

play02:20

died do you manually restart each

play02:23

container if you have maybe five

play02:26

replicas of

play02:27

one application container you don't need

play02:30

any more how do you get rid of all those

play02:32

containers do you stop them and remove

play02:35

them one by one and these are all

play02:38

things

play02:39

that you need to manage when you have

play02:41

tens of containers maybe hundreds of

play02:44

containers that you need to manage on

play02:47

your infrastructure so obviously you

play02:49

need some kind of automation some kind

play02:52

of tool that can help you with all these

play02:56

issues

play02:57

and all these things that i just

play02:58

mentioned are features of a container

play03:02

orchestration tool so you probably

play03:04

already know one of them which is the

play03:06

most popular orchestration tool

play03:09

kubernetes but of course there are

play03:11

multiple orchestration tools out there

play03:14

docker swarm is one of them which is

play03:16

for less complex a bit smaller

play03:20

containerized applications you also have

play03:23

mesos apache mesos you also have

play03:26

hashicorp

play03:28

nomad and you also have an aws service

play03:32

called amazon elastic container service

play03:35

ecs so ecs is one of the container

play03:40

services that aws offers and it is

play03:43

essentially a container orchestration

play03:46

service

play03:50

so ecs being an orchestrator for

play03:53

containers will manage the whole life

play03:55

cycle of a container when you start the

play03:58

container if it needs to get rescheduled

play04:00

somewhere if it needs to get restarted

play04:03

load balanced etc

play04:05

so how does this service actually work

play04:08

on aws if you wanted to create a cluster

play04:13

a container cluster basically that is

play04:16

managed by aws ecs service you would

play04:20

create an ecs cluster

play04:23

and that ecs cluster will basically

play04:26

contain all the services

play04:28

that are necessary for managing the

play04:31

individual containers so ecs cluster

play04:35

basically represents a control plane for

play04:38

all your

play04:39

virtual machines that are running

play04:42

containers

play04:44

and that control plane and the services

play04:47

the managing services

play04:49

in that control plane then can manage

play04:51

these individual containers

play04:54

and essentially managing the whole life

play04:56

cycle of a container from being started

play04:58

scheduled to being removed when you

play05:01

create ecs cluster as i said you have

play05:05

the control plane but the containers

play05:07

need to run somewhere right so

play05:09

containers need to run on actual

play05:11

machines on virtual machines so where do

play05:14

these virtual machines come from these

play05:17

virtual machines

play05:19

will be the ec2 instances we would

play05:22

create an ec2 instance that will

play05:25

basically host the containers the ec2

play05:28

will not be isolated and managed by us

play05:31

completely but ec2 instance will be

play05:34

connected to this ecs cluster that we

play05:37

created and on those ec2 instances you

play05:40

will have the docker runtime or

play05:42

container runtime generally

play05:44

so that containers can run and also

play05:46

you're going to have ecs agents

play05:49

installed and this way the control plane

play05:52

or ecs processes can communicate with

play05:56

each individual ec2 instance and manage

play05:59

them

play06:00

so at the end it means that you have a

play06:03

control plane that helps you

play06:05

manage all your containers and automate

play06:08

some of these

play06:09

complex things that you don't want to do

play06:12

manually and repeatedly so you have

play06:14

delegated the management of your

play06:17

containers to an aws service so you

play06:19

don't have to worry about that however

play06:22

you still have to

play06:23

manage

play06:24

the actual virtual machines

play06:27

the ec2 instances

play06:30

meaning you have to create the ec2

play06:32

instances you have to join them to the

play06:35

ecs cluster and when you schedule a new

play06:38

container you have to make sure that you

play06:41

have enough ec2 instances and resources

play06:44

to schedule the next container you also

play06:47

have to manage the server operating

play06:50

system

play06:51

and you also have docker runtime and the

play06:53

ecs agent as i mentioned so all these

play06:56

are basically part of

play06:58

a virtual machine that you have to still

play07:01

manage

play07:02

on the upside of course you

play07:05

have

play07:06

full access to your infrastructure which

play07:08

is an advantage if you need full

play07:11

configuration access and power of the

play07:14

infrastructure that's running your

play07:15

containers

play07:16

so now you have delegated the management

play07:20

of your containerized application or

play07:22

your containers basically to the aws

play07:25

service which of course makes your

play07:26

operations easier however you still have

play07:29

the infrastructure to manage the virtual

play07:33

servers

play07:37

now what if you wanted to delegate

play07:40

management of the infrastructure also to

play07:44

aws

play07:45

so you want the container lifecycle to

play07:47

be managed by aws and you want the

play07:51

hosting infrastructure to also be

play07:53

managed by aws now there is an option

play07:56

for that and it is called

play07:58

aws far gate so far gate is basically an

play08:02

alternative to ec2 instances so instead

play08:05

of creating a provisioning ec2 instances

play08:08

and connecting that to the ecs cluster

play08:11

you don't need to provision any virtual

play08:13

machines you use fargate interface and

play08:16

fargate will take care of spinning up

play08:19

the vm to run your container

play08:22

so how does fargate work

play08:24

fargate is a serverless way to launch

play08:27

containers so you take a container that

play08:31

you want to deploy on aws

play08:35

and you tell aws here's my container

play08:38

please run it and you hand it over to

play08:41

fargate now at this point you don't have

play08:43

any virtual machine that will run your

play08:46

container you haven't provisioned

play08:48

anything

play08:49

or any server yet you just have the

play08:52

control plane of ecs and you have the

play08:55

far gate interface so you give your

play08:56

container to fargate and you say please

play08:59

schedule this fargate will then take

play09:02

your container

play09:03

it will analyze by looking at your

play09:05

container how much resources your

play09:08

container needs to run how much cpu how

play09:11

much ram how much storage it needs to be

play09:14

deployed and to run

play09:16

and then fargate will itself

play09:19

automatically provision a server

play09:22

resources for that specific container

play09:25

and then it will deploy and run that

play09:27

container on the provisioned server

play09:30

resources so this happens automatically

play09:33

and every time you add or you hand over

play09:36

a new container to deploy to fargate

play09:39

fargate will do the same you go and

play09:41

provision server resources to run that

play09:43

specific container

play09:45

so advantages are obviously you don't

play09:48

need to worry about having enough ec2

play09:51

instances and resources to schedule a

play09:53

new container because you don't have to

play09:54

provision anything beforehand and

play09:56

because you don't have to provision the

play09:58

infrastructure before you deploy

play10:00

containers you always have

play10:03

only the amount of infrastructure

play10:05

resources needed to run your containers

play10:08

and that means

play10:10

you pay only for the resources that your

play10:12

containers are actually consuming

play10:15

and also

play10:16

it really easily scales without fixed

play10:19

set of ec2 resources defined beforehand

play10:23

since every new container gets new

play10:24

resources the pricing is based on how

play10:28

long the container

play10:29

runs

play10:31

and how much cpu and memory was

play10:34

requested for that container

play10:37

so for comparison for ec2 you obviously

play10:40

pay for the whole server even though you

play10:42

might not be running any containers on

play10:44

it or just a few maybe

play10:46

and for fargate you only pay for the

play10:48

resources that container is consuming

play10:51

so now you have your

play10:54

infrastructure managed by aws using the

play10:57

fargate service and the containers that

play11:01

are running that were scheduled through

play11:03

fargate are now also managed by ecs so

play11:07

you have multiple levels of your

play11:10

infrastructure and the application on it

play11:12

being managed by aws services now the

play11:15

only thing that you have to worry about

play11:18

and manage

play11:20

is the actual application itself so

play11:23

you develop the application you create

play11:25

containers and that's it and then you

play11:27

just deploy the containers on aws

play11:30

infrastructure

play11:32

which obviously is a great thing however

play11:34

again if you need

play11:36

more access to the underlying

play11:38

infrastructure you need access to the

play11:40

actual infrastructure

play11:42

running your containers then you have

play11:44

the flexibility and access with ec2

play11:47

instances

play11:49

and of course when you run your

play11:50

containerized application on aws

play11:53

infrastructure using the aws services

play11:57

you have advantage of using

play11:59

any other aws services from the aws

play12:02

ecosystem right so

play12:04

both ec2 and fargate and ecs and all

play12:08

these services obviously fully integrate

play12:11

with

play12:11

the whole aws ecosystem right so this

play12:14

could be cloud watch for monitoring

play12:17

elastic load balancer for load balancing

play12:20

iam for permissions and users vpc for

play12:24

networking and so on

play12:30

now this is how you can let aws manage

play12:33

your containerized applications using

play12:36

ecs

play12:37

now what if

play12:39

you want to use kubernetes as you know

play12:41

kubernetes is the most popular container

play12:44

orchestration tool currently so a lot of

play12:47

projects a lot of companies actually use

play12:49

kubernetes so can you still use aws

play12:54

infrastructure

play12:55

if you want to use kubernetes and how

play12:58

can you use that aws actually has

play13:01

another service which is for

play13:04

managing kubernetes cluster on aws

play13:08

infrastructure so alternative to ecs you

play13:12

have a service called eks which stands

play13:15

for elastic kubernetes service that lets

play13:18

you manage kubernetes cluster

play13:21

so the difference or advantage of using

play13:24

eks is the first thing that i just

play13:26

mentioned which is if you're using

play13:29

kubernetes already and your project

play13:31

wants to deploy their kubernetes cluster

play13:34

on aws

play13:35

infrastructure obviously you want to be

play13:38

able to keep your kubernetes tool and

play13:41

not use

play13:42

a proprietary container orchestration

play13:45

of aws you have an option of doing that

play13:49

using eks

play13:50

so that's the first obvious reason

play13:53

another reason if you

play13:55

do not necessarily think about using

play13:57

kubernetes or you don't already use

play13:59

kubernetes in your project making

play14:01

decision between ecs and eks is

play14:04

basically ecs is specific to aws right

play14:08

so if you decide at some later point to

play14:11

migrate to another platform you will not

play14:13

be able to move that cluster to another

play14:16

platform because it is really integrated

play14:19

and based on aws with eks though because

play14:23

it's managing the kubernetes cluster you

play14:25

can easily migrate kubernetes because

play14:27

it's not specific to aws right it's an

play14:30

independent tool which you can use

play14:32

anywhere so you can migrate or much

play14:35

easily migrate kubernetes cluster on

play14:38

another platform or maybe even on

play14:41

premise right if you have your own

play14:43

infrastructure in your company then

play14:45

you can use the same configuration same

play14:48

tools across multiple platforms so

play14:51

that's a major advantage of using eks

play14:55

versus ecs now i have to mention here

play14:58

that even though kubernetes is an

play15:00

independent tool if you're using it on

play15:03

aws and you use a lot of additional

play15:07

tools and services from the aws

play15:09

ecosystem in your kubernetes cluster

play15:12

then of course when you migrate your

play15:14

kubernetes cluster you'll have to

play15:16

replace those services with some other

play15:18

tools because they will not be available

play15:20

on another platform right because these

play15:22

services are again specific to aws so

play15:26

just know that it's not 100

play15:28

easily migratable especially if you're

play15:30

using aws specific services in your

play15:33

cluster so that's maybe one thing to

play15:35

consider another also important reason

play15:38

for using eks versus ecs is

play15:42

that if you use kubernetes which is

play15:44

again a much more popular orchestration

play15:46

tool than ecs you also have access to

play15:50

all the kubernetes tools and plugins and

play15:52

things are developing in the kubernetes

play15:55

ecosystem like helm and some other tools

play15:58

that integrate well with kubernetes now

play16:01

on the side of ecs a more suitable

play16:04

use case for ecs

play16:07

is if you have less complex

play16:08

containerized applications that maybe

play16:11

don't need this full-fledged kubernetes

play16:13

cluster to run in in this case you can

play16:16

actually deploy it on ecs cluster and

play16:19

also you don't pay for the ecs control

play16:22

plane compared to eks cluster control

play16:26

plane

play16:27

but generally i think eks is much better

play16:31

choice

play16:32

for managing and orchestrating your

play16:34

cluster on aws infrastructure now how

play16:38

does eks work it's actually pretty

play16:40

similar to how ecs works with eks you

play16:44

create a cluster

play16:46

which represents the control plane in

play16:49

kubernetes world these are going to be

play16:51

the masternodes so when you create an

play16:53

eks service or eks cluster aws will

play16:58

provision in the background kubernetes

play17:00

masternodes

play17:02

that already have all the kubernetes

play17:04

master services installed on them so all

play17:07

of that is managed and provisioned for

play17:10

you you don't have to worry about

play17:11

masternodes for your kubernetes cluster

play17:14

also because it's managed by aws

play17:18

these master nodes it will automatically

play17:21

replicate the master nodes across

play17:24

multiple availability zones so if you're

play17:26

creating eks in region

play17:29

eu west 3 that has three availability

play17:32

zones then you will get automatic

play17:35

replication of your masternodes on all

play17:38

those azs and of course then you have

play17:41

the storage which is the lcd part of the

play17:44

master processes which stores

play17:47

the whole configuration

play17:49

the current state basically of

play17:51

kubernetes cluster and that storage

play17:53

needs to be replicated and needs to be

play17:55

backed up because you shouldn't or you

play17:57

can't lose the data otherwise you lose

play18:00

all your cluster configuration and again

play18:03

because it's a managed service aws will

play18:06

also take care of storing the data

play18:09

replicating it and

play18:11

backing it up properly so basically

play18:13

masternodes of kubernetes is not your

play18:16

worry anymore so with eks you have the

play18:19

master nodes control plane configured

play18:22

now you need the worker nodes right you

play18:24

need infrastructure that actually runs

play18:26

your containers again same way as in the

play18:29

ecs you will create ec2 instances the

play18:33

so-called compute fleet of multiple

play18:36

virtual servers and then connect them to

play18:39

the eks

play18:41

and now you have the masternodes and

play18:43

worker node group connected and that

play18:46

gives you a complete kubernetes cluster

play18:49

and once that's done you can simply

play18:52

connect to the cluster using cubectl

play18:55

command and start deploying containers

play18:57

inside that cluster in the example of

play18:59

ecs we saw that these ec2 instances this

play19:02

compute fleet each server had the ecs

play19:06

agent installed this way the control

play19:09

plane could communicate with the

play19:10

individual nodes in this case we're in

play19:14

the kubernetes world so worker nodes

play19:16

will have kubernetes processes so this

play19:18

way control plane or kubernetes

play19:20

masternodes can communicate with worker

play19:23

nodes just like they do on any platform

play19:25

right it's not specific to aws in this

play19:28

case so you have the worker nodes made

play19:30

out of ec2 instances

play19:34

that are connected to the eks

play19:37

cluster

play19:38

however in this case also you need to

play19:40

manage the ec2 instances yourself you

play19:44

have to manage the operating system and

play19:46

the process is running on them in eks

play19:49

cluster however you have a possibility

play19:52

to choose a semi-managed ec2 instances

play19:57

for your cluster so basically you can

play19:59

group your worker nodes into node groups

play20:03

and that node group can actually handle

play20:06

some of the heavy lifting for you and

play20:08

basically make it easier for you to

play20:11

configure new worker nodes for your

play20:13

cluster for example worker nodes or ec2

play20:17

instances manage my node group will get

play20:20

all the processes

play20:21

necessary installed on them so you don't

play20:24

have to worry about installing container

play20:26

runtime kubernetes worker processes

play20:29

etc for them to make it into worker

play20:32

nodes so that means you have an

play20:34

alternative between completely

play20:36

self-managed ec2 instances and

play20:39

semi-managed ec2 instances through node

play20:42

groups

play20:43

and when working with eks cluster

play20:47

it is actually a good practice to use

play20:49

node groups because they make a lot of

play20:51

things simpler and you can also

play20:54

create multiple node groups to group

play20:55

your worker nodes in different logical

play20:58

groups but as i said it is still

play21:00

semi-managed you still have to take care

play21:03

of some other stuff for example auto

play21:06

scaling right you don't have the auto

play21:08

scaling configuration out of the box you

play21:10

still need to configure things in

play21:12

kubernetes and on the aws side to make

play21:16

auto scaling possible so you have to

play21:18

take care of

play21:19

creating new ec2 instances removing them

play21:22

etc

play21:24

however if that's also something you

play21:27

want to delegate to aws if you don't

play21:30

want to worry about that you can also

play21:32

for eks cluster use fargate instead and

play21:37

in that case you would have fully

play21:39

managed worker nodes in addition to

play21:42

fully managed control plane so these are

play21:45

the three steps of

play21:47

worker node

play21:49

infrastructure management you have

play21:51

available in aws

play21:54

or you can even use both ec2 and fargate

play21:58

at the same time for the same eks

play22:00

cluster

play22:02

so basically from the hosting

play22:04

perspective of where your containers are

play22:06

running having ec2 and fargate as

play22:09

alternatives this part is pretty much

play22:12

the same whether you use ecs or eks

play22:17

and this basically gives you the

play22:20

combination of the services that you

play22:23

have as an option if you want to run a

play22:26

containerized application

play22:28

on aws

play22:30

using a container orchestration tool to

play22:32

manage them

play22:37

now we just saw two of the services

play22:40

on aws that are specifically for

play22:42

containers and there is one more

play22:44

container service on aws and that is

play22:48

amazon ecr which stands for elastic

play22:52

container registry so basically this is

play22:55

just

play22:56

a repository for container images

play22:59

alternative to docker hub or

play23:02

nexus docker repository where you can

play23:05

store your docker images for example

play23:08

advantage

play23:10

of using elastic container registry is

play23:13

of course

play23:15

because it's part of the whole aws

play23:17

ecosystem it integrates well with other

play23:20

services so for example if you use eks

play23:24

with ec2 instances for example

play23:27

then it will be easier to connect it and

play23:30

configure

play23:31

your cluster

play23:33

with

play23:34

ecr to fetch the instances but also to

play23:37

do some other stuff like automatically

play23:40

get notified when a new version of the

play23:43

image gets pushed to the registry and

play23:46

then automatically download that into

play23:48

your cluster and also some other

play23:52

additional features and of course you

play23:53

have all those abilities because these

play23:55

are all aws services so they are tightly

play23:58

integrated with each other

play24:00

and ecr is pretty easy and

play24:02

straightforward to use

play24:04

you basically create your private

play24:06

repositories for your different

play24:09

application images or docker images and

play24:13

you can start pushing different versions

play24:16

or different tags of that image to those

play24:19

registries and then of course use that

play24:21

endpoint

play24:22

to download the images from the cluster

play24:29

so to summarize on aws you have three

play24:32

container services

play24:34

first for storing container images in

play24:37

private container repository and the

play24:40

other two for orchestrating or managing

play24:43

your complex containerized application

play24:47

on aws infrastructure

play24:49

and in this part we're gonna look at ecr

play24:52

and ek services and use them in our ci

play24:56

cd pipeline

play24:57

to build and push

play24:59

images to ecr and deploy them to elastic

play25:03

kubernetes service

play25:05

[Music]

Rate This

5.0 / 5 (0 votes)

الوسوم ذات الصلة
AWS containersECS vs EKSAWS FargateContainer orchestrationCloud deploymentKubernetesElastic Container RegistryCloud infrastructureServerless containersCI/CD pipelines
هل تحتاج إلى تلخيص باللغة الإنجليزية؟