Concepts Flashcards
What is a container?
A container image is a lightweight, stand-alone, executable package of a piece of software that includes everything needed to run it: code, runtime, system tools, system libraries, settings.
What are some benefits of containers?
- Software will always run the same, regardless of the environment.
- Containers isolate software from its surroundings, for example differences between development and staging environments and help reduce conflicts between teams running different software on the same infrastructure.
How do containers and virtual machines behave differently?
Have similar resource allocation and isolation benefits but containers virtualize OS rather than hardware.
Can multiple containers run on the same machine and how?
Yes. They share the OS kernel with other containers each running isolated processes in user space.
Whats the space benefit when compared to VMs?
Containers take up less space than VMs and start almost instantly. Container images are typically tens of MBs in size whereas VMs takes up tens of GBs.
How does VMs work basically?
They virtualize physical hardware. Hypervisor allows multiple Vms on a single machine. Each VM includes a full copy of an OS, on or more apps, necessary bins etc.
What is a hypervisor basically?
A hypervisor or virtual machine monitor (VMM) is computer software, firmware, or hardware, that creates and runs virtual machines.
Can VMs and containers run together?
Yes they can.
What is Containerd?
It is an industry standart container runtime. Available as a daemon for both for Linux and Windows. It manages the complete container lifecycle of its host system, image transfer and storage, container execution and supervision, low-level storage and network attachments.
What is runC?
Its the runtime code for Docker. Docker engine is built on runC and Containerd.
What are the basic similarities between containers and VMs?
Both are designed to provide an isolated environment in which to run an application.
In both the env. is represented as a binary artifact that can be moved between hosts.
ClusterIP vs NodePort ?
<b>ClusterIP:</b> Exposes the service on a cluster-internal IP. Choosing this value makes the service only reachable from within the cluster. This is the default ServiceType.
<b>NodePort:</b> Exposes the service on each Node’s IP at a static port (the NodePort). A ClusterIP service, to which the NodePort service will route, is automatically created. You’ll be able to contact the NodePort service, from outside the cluster, by requesting :
ReplicaSet ?
A ReplicaSet ensures that a specified number of pod replicas are running at any given time. However, a Deployment is a higher-level concept that manages ReplicaSets and provides declarative updates to pods along with a lot of other useful features. Therefore, we recommend using Deployments instead of directly using ReplicaSets, unless you require custom update orchestration or don’t require updates at all.
This actually means that you may never need to manipulate ReplicaSet objects: use a Deployment instead, and define your application in the spec section.
Service
Service: An API object that describes how to <b>access </b> applications, such as a set of Pods , and can describe ports and load-balancers. [-]
The access point can be internal or external to the cluster.
.jar and -cp
A JAR (Java ARchive) is a package file format typically used to aggregate many Java class files and associated metadata and resources (text, images, etc.) into one file for distribution
-cp is for classpath