Container Flashcards

1
Q

What is Docker?

A

A platform for developing, shipping, and running applications in containers.

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

What are the benefits of using Docker?

A
  • Application portability
  • Consistent performance
  • Simplified maintenance
  • Improved resource utilization
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Docker Hub?

A

A public registry for storing and sharing Docker images.

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

What is Amazon ECR?

A

A private registry for storing and managing Docker images on AWS.

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

How does Docker differ from a virtual machine?

A

Docker shares the host OS kernel, while VMs have their own guest OS. This makes Docker containers more lightweight and efficient.

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

What is Amazon ECS?

A

Amazon’s own container orchestration service for deploying and managing containers.

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

What are the two launch types for Amazon ECS?

A

EC2 launch type (you manage the EC2 instances) and Fargate launch type (serverless).

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

What is AWS Fargate?

A

A serverless compute engine for containers that removes the need to manage servers or clusters.

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

What is an EC2 Instance Profile used for in Amazon ECS?

A

It allows the ECS agent to make API calls to the ECS service.

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

What is an ECS Task Role?

A

It allows each task to have a specific role for accessing AWS resources.

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

What are the supported load balancers for Amazon ECS?

A

Application Load Balancer, Network Load Balancer, and Classic Load Balancer (not recommended).

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

What is Amazon EFS?

A

A fully managed, elastic file system that can be mounted onto ECS tasks for persistent storage.

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

What is Amazon EKS?

A

A managed Kubernetes service on AWS for deploying, managing, and scaling containerized applications.

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

What is Kubernetes?

A

An open-source system for automating deployment, scaling, and management of containerized applications.

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

What are the node types in Amazon EKS?

A

Managed Node Groups, Self-Managed Nodes, and Fargate.

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

What is a StorageClass in Amazon EKS?

A

It defines how data volumes are provisioned for your pods in a Kubernetes cluster.

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

What is the benefit of using Managed Node Groups in Amazon EKS?

A

EKS creates and manages the worker nodes for you.

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

Why would you choose EKS over ECS?

A

If you need the flexibility and portability of Kubernetes or have existing Kubernetes deployments.

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

What is a key benefit of containerization?

A

Provides consistency across different environments, from development to production.

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

What is the purpose of a Dockerfile?

A

A text document that contains all the commands a user could call on the command line to assemble an image.

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

What is a key benefit of Docker containers?

A

They can run on any OS without compatibility issues.

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

Name two use cases for Docker.

A

Microservices architecture and lift-and-shift applications to the cloud.

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

Where are Docker images stored?

A

Docker repositories like Docker Hub and Amazon ECR.

24
Q

What is the difference between Docker and virtual machines?

A

Docker shares resources with the host OS while virtual machines have their own isolated OS.

25
Q

What are the two main ways to manage Docker containers on AWS?

A

Amazon ECS (Elastic Container Service) and Amazon EKS (Elastic Kubernetes Service).

26
Q

What is AWS Fargate?

A

A serverless container platform that works with both ECS and EKS.

27
Q

What are the two launch types for Amazon ECS?

A

EC2 launch type and Fargate launch type.

28
Q

What is the role of the ECS Agent in EC2 launch type?

A

It registers the EC2 instance in the ECS cluster and allows for container management.

29
Q

How do you scale containers in Amazon ECS with Fargate launch type?

A

By increasing the number of tasks.

30
Q

What are the two IAM roles for ECS?

A

EC2 Instance Profile and ECS Task Role.

31
Q

What is the purpose of the EC2 Instance Profile in ECS?

A

It’s used by the ECS agent to make API calls, send logs to CloudWatch, pull images from ECR, and access sensitive data.

32
Q

What is the purpose of the ECS Task Role?

A

It allows each task to have specific permissions to access AWS resources.

33
Q

Which load balancer is recommended for most use cases in Amazon ECS?

A

Application Load Balancer.

34
Q

When would you use a Network Load Balancer in Amazon ECS?

A

For high throughput/performance or with AWS Private Link.

35
Q

Which file system can be mounted onto ECS tasks for data volumes?

A

Amazon EFS.

36
Q

Can you mount Amazon S3 as a file system for ECS tasks?

A

No, Amazon S3 cannot be mounted as a file system.

(But now: Yes, with S3 mountpoint)

37
Q

What is Amazon ECR?

A

Elastic Container Registry, a service to store and manage Docker images on AWS.

38
Q

Does Amazon ECR support public repositories?

A

Yes, through Amazon ECR Public Gallery.

39
Q

What are the node types in Amazon EKS?

A

Managed Node Groups and Self-Managed Nodes.

40
Q

What is AWS Fargate in the context of EKS?

A

It allows you to run serverless containers without managing worker nodes.

41
Q

What is a StorageClass in Amazon EKS?

A

A manifest that defines how data volumes are provisioned in your EKS cluster.

42
Q

How does Kubernetes handle persistent storage in EKS?

A

It leverages a Container Storage Interface (CSI) compliant driver.

43
Q

Which storage options are supported for data volumes in Amazon EKS?

A

Amazon EBS, Amazon EFS, Amazon FSx for Lustre, and Amazon FSx for NetApp ONTAP.

44
Q

What is the advantage of using Amazon EFS for data volumes in EKS?

A

It works with Fargate and provides persistent, multi-AZ shared storage.

45
Q

How are logs and metrics collected for containers in EKS?

A

Using CloudWatch Container Insights.

46
Q

Is Kubernetes specific to AWS?

A

No, Kubernetes is cloud-agnostic and can be used in any cloud environment.

47
Q

How would you deploy EKS for multiple regions?

A

Deploy one EKS cluster per region.

48
Q

What are EKS Pod Identities?

A

A feature that allows you to manage credentials for applications running in EKS pods, similar to EC2 instance profiles.

49
Q

How do EKS Pod Identities work?

A

You associate an IAM role with a Kubernetes service account, and pods using that service account automatically receive the associated IAM role’s credentials.

50
Q

What are the key benefits of EKS Pod Identities?

A

Least privilege, credential isolation, and auditability.

51
Q

How do EKS Pod Identities achieve least privilege?

A

By scoping IAM permissions to a service account, ensuring that only pods using that service account have access to those permissions.

52
Q

How do EKS Pod Identities ensure credential isolation?

A

A pod’s containers can only access the credentials for the IAM role associated with their service account, preventing access to credentials used by other containers.

53
Q

How is auditability achieved with EKS Pod Identities?

A

Access and event logging is available through AWS CloudTrail, enabling retrospective auditing.

54
Q

What are some advantages of EKS Pod Identity over IAM roles for service accounts (IRSA)?

A

Independent operations, reusability, and scalability.

55
Q

How does EKS Pod Identity improve reusability?

A

It uses a single IAM principal (pods.eks.amazonaws.com) for all clusters, simplifying IAM role management.

56
Q

How does EKS Pod Identity enhance scalability?

A

Temporary credentials are assumed by the EKS Auth service once per node, reducing the load compared to IRSA, where each pod assumes the role individually.

57
Q

What are the steps to set up EKS Pod Identities?

A
  • Set up the Amazon EKS Pod Identity Agent.
  • Assign an IAM role to a Kubernetes service account.
  • Configure pods to use the service account.
  • Ensure the workload uses a supported AWS SDK version and the default credential chain.