Deck 1 - Introduction to Docker and Kubernetes Flashcards

1
Q

What is containerization?

A

Containerization is a software which enables operating system to create multiple isolated user-space for applications.
Operating system could be running on physical hardware or virtual machine

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

What is created when a container is created is it Kernel space or user space?

A

User space is created for isolation. It uses linux utilities called namespace to isolate one container from other.

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

Containerization vs Virualization

A

1) Containerization is to segregate application from the underlying OS. While virtualization is a way to create VM from hardware resources.
Cloud providers use mix of both.

2) In containerization it is easy to move software from one computing environment to another. Eg. from Dev -> Staging -> Production.
Virtual machine guest is more tightly tied to the underlying hypervisor and movement of application from dev to staging to production environment requires more effort.

3) Containers consumes less CPU, memory and disks.
While applications running on virtualization requires full stack of resource and result in more waste of resources.

4) Containers are more in line with the devops approach. It is more agile and easy to manage than virtualization.
Virtualization management is also easy but when it comes to port applications between different environment then it requires more efforts.

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

How should we use baremetals? One way is either create one large machine and run multiple containers on top of the VM. Or create individual VMs and then deploy containers.

A

In the first approach we get more computing resources and it will be faster as containers are running directly on top of OS.
In case of other approach it will be bit slower as there is one additional hop that needs to be jumped. But it is more resilient as even if one VM goes down we have other VM to work with.

It is a tradeoff.

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

What are containers?

A

Containers are type of virtualization technology which uses host operating system kernel to run multiple guest instances.
Container is nothing but running instance of image. Image consists of libraries, binaries and the corresponding RootFS required by container to run.

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

What is docker?

A

Docker is a container engine that is used to create containers.

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

What things does each container have its own?

A
Root file system
Networking IPs and ports, hostnames
Processes
Devices
Memory

A container will not show process related to other containers or host machine.
You can assign memory and CPU to container. This can be done using docker or by kubernetes. Both have different ways.

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

What is used to map networking from docker container to host machine networking?

A

There is a bridge called docker0, which takes care of mapping the network interface inside the container to network interface on the host machine.

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

Which linux kernel features does docker use to achieve containerization?

A

It uses cgroups, namespaces, chroot and others to provide resource isolation.

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

Is the statement “Docker enables containerization” true? And elaborate

A

No, docker uses kernel to achieve containerization. It is the inherent property of underlying OS to enable containerization. That is why till long time docker did not support windows as there was no support for containerization in Windows.
Docker enables management of containers and images.

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