Containers and VMs Flashcards

(38 cards)

1
Q

Why would a developer choose to use a Virtual Machine over a container solution?

A

A VM is necessary when the application requires:

  1. OS Control
  2. Security/Compliance
  3. Statefulness
  4. Simplicity (It’s too hard to break it up into microservices)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Can you develop your own container specific to your application need?

A

Yes, via a Dockerfile

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does VM stand for?

A

Virtual Machine

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does a VM virtualize?

A

The hardware

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does a container virtualize?

A

The OS Layer of a machine

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which has a faster startup time between VMs and Containers?

A

Containers (secs/ms) are faster than VMs (mins), because VMs have to start up the OS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does a hypervisor do?

A

A hypervisor creates and runs VMs on physical machines and enforces the VM’s isolation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do containers use the hypervisor?

A

They don’t. Containers bypass the hypervisor and go directly to the OS kernel

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What primary container advantage makes it ideal for microservices and Auto Scaling on AWS?

A

Speed and Density. The rapid seconds-to-milliseconds startup time (no OS boot) allows for much faster horizontal scaling (agility) and higher density (cost efficiency) compared to VMs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What AWS service is used to store and manage your custom container images?

A

Amazon ECR (Elastic Container Registry). Think of it as Docker Hub managed by AWS.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does Amazon ECR stand for?

A

Elastic Container Registry

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does Amazon ECS stand for?

A

Elastic Container Service

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What types of EC2 instances are Virtual Machines?

A

All of them!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does Amazon EKS stand for?

A

Elastic Kubernetes Service

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the difference between the Control Plane and the Data Plane of a container system?

A

The control plane is the “brain” or management layer of an orchestration system that makes decisions on scheduling, scaling, and maintaining the desired state of the cluster.

The data plane is the “muscle” (worker) that does the actual running of a task

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a container image?

A

A standalone, executable software package that includes everything needed to run an application: code, runtime, system tools, and libraries. It is a static, read-only blueprint.

16
Q

What is the relationship between a container image and a container?

A

The container is a running instance of a container image.

The image is the static, read-only blueprint.

17
Q

Does a container image include your specific application code or just infrastructure specs?

A

Both

It packages the application code on top of the necessary infrastructure

18
Q

What AWS service is the primary type of VM?

A

Amazon EC2 instances.

19
Q

What AWS services are used to deploy and run containers?

20
Q

What AWS service is used to store and manage your custom container images?

21
Q

What is the role of Kubernetes?

A

It is an open-source Control Plane

22
Q

What is the primary difference between ECS and EKS?

A

The Control Plane.
- ECS is AWS proprietary (simpler, integrated).
- EKS uses the open-source Kubernetes standard (high portability).

23
Q

What is the main advantage of choosing EKS over ECS?

A

Portability.

K8s can be moved to other cloud providers

24
What is the input you provide to Fargate?
You provide a **Container Image** (and Task Definition).
25
In which AWS container services does _AWS_ manage the control plane?
AWS Manages Control Plane for: ECS and EKS
26
How do you define the contents of a container image?
**Dockerfile**
27
What does **K8s** stand for?
Kubernetes
28
What is the difference between Fargate and ECS (EC2 Launch Type)?
Fargate is **serverless.** With the ECS EC2 launch type, you must manage the EC2 VMs yourself. | Container as a service, not like Lambda which is function as a service
29
# In the context of AWS What does AWS **A2C** stand for?
**A**pp **to** **C**ontainer
30
What does AWS A2C do?
Itis a CLI tool that converts your application into a container image
31
What does AWS Copilot do?
It is a CLI tool that manages the deployment and running of container instances
32
What is the recommended method for granting AWS permissions to a container running in ECS or EKS?
Use an **IAM Task Role** | This grants permissions directly to the container/task.
33
What AWS service should you use for persistent, shared file storage with ECS and EKS?
Amazon **EFS**
34
How do containerized microservices in an ECS cluster find and communicate with each other?
Via **AWS Cloud Map** (for service discovery) _or_ using an **Application Load Balancer (ALB) with target groups**.
35
In which AWS Service does AWS manage the data plane?
Fargate
36
Suppose you wanted to have a fully managed serverless container setup. What AWS Services could you use to do this?
ECS for the control plane Fargate for the data plane ECR to store the image
37
What are the 2 types of IAM roles a developer must configure when using ECS/EKS Fargate? and what is the key difference between them?
1. **Task Role** (grants permissions to the application code running in the container). 2. **Task Execution Role** (grants permissions to the _ECS agent_ to pull the image and publish logs/metrics).