Pods Are New VMs, Containers Are New Proccesses

Hello i am Erdenay Ateş,
In these times we are always hearing about containers, container orchestration, pods, competition of microservices vs monolithic. Today’s topic about containers and container orchestration units.

Relation Between Applications and Hardware
Actually container is a solution of some problems, this is the reason of the container’s birth. When we are using some tools or applications, that thing is using our resource of computer, for an example like web browsers. If you are using any web browser for reading that post, probably you are using a web browser. And if you type Ctrl+Alt+Del you will see how much of your memory(RAM) is being used because of your web browser.
In this step we just learnt “applications are using our hardware” for using that hardware we need to an distrubation of operation system (such as Ubuntu, Kali, Windows 10) because operation systems are matching these gaps between applications and hardware. And these gaps are being filled with procceses.

What is Process?
Assume we have got a processor with only one core, that means that proccesor can handle only one procces. If you want to run multiple procceses you should use “time sharing” like “Stop A procces and save it, start to running B procces” and that will be an infitine loop. While processor doing maybe there is just 1–2 miliseconds gaps while doing that loop and we can’t understand or feeling that stopping moment because this is so short for us. But if you are using multiple cores proccesor there is not any event like that.

Virtualization and Virtual Machines
For another example if you have got 3 services like A, B, C and when you run these 3 projects separately they might be affects theirself like security, hardware sharing.
Because of that you should run these services in different systems so that means we should isolatio them, every single service should be alone. And for that problem first solution was virtualization with Hypervisiors (VirtualBox or VMware) & VMs (Virtual Machines). Maybe solution of running 3 services seperatly can be virtualization but when you need 20 or 30 VMs that can be so painful.

As we said before we need to isolatio every services. We can do that wih VMs but that solution gives us waste of time and hardware. Containers bring us new approach, for an example assume we are using computer with Ubuntu. With containers we can create really small machines inside of our real computer. Such as CentOS, SUSE, Amazon Linux … And they are working like procceses.
If you are using Docker for container with “docker pull ubuntu” that command download a 75 megabyte image and with “docker run ubuntu” command you can have really small container with Ubuntu inside.

If you are doing something with Python, MySQL, Go, Jenkins and etc with some commands you can have deployment enviroment so quickly. For another example after running that command “docker run -p 8080:8080 jenkins” you can go to your browser and type YOUR-IP:8080, you can see there is Jenkins application is running. Okay we just learnt container basics and we created 100 containers. How we can deal with them?

Container Orchestration

When we have got bunch of containers we should use some software tools for giving some order to containers. Why we need that? Like you need to have containers with stable number. If you say “I want to have 100 containers always, because i need that constant number for my load balancing” to container orchestration. So how are these container orchestration tools working? For example, Kubernetes is working with ymal extension files and you are writing to inside of that file “I want to have 25 container with Nginx image, always!”. And Kubernetes is always checking these containers and keeping their amount of number is 25.
Because containers are living and dying, every single container has a life cycle. And when a container is done, your container orchestration tool keeps them alive(like rebirth).

Lets continue with architecture of Kubernetes. These containers are living in pods and these pods belong to nodes. And the name of big environment which is including everything is cluster.

Cluster = Whole environment
Node = Always keeps the containers inside. That can be physical or virtual machines.
Pod = That component is acting like small virtual machine and covers the containers with layer. A pod can include multiple containers or single container. You keep 2 pods like Pod A = [Python + MySQL containers] Pod B = [Go + Redis containers]

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store