Tabla de contenido
Why should we containerize our applications? First of all, it should be noted that an application can run correctly in a system without containers or inside a container. It can run correctly in either mode.
So why “waste time” passing the application to containers?
When we prepare an application to run in containers we are not wasting time. On the contrary, we are gaining time in the future.
Let me explain, when an application is prepared to run on containers, we are making the application more independent of a system because we can update the system where the containers run without affecting the application and on the contrary, we can update the application image without affecting the base system. Therefore, we provide a layer of isolation to the application.
It is important to highlight that the image that we prepare for the application should comply with the OCI or Open Container Initiative standards (as can be verified in https://opencontainers.org/ ), that is to say, the image is OCI compliant and we can run the image of our application in all the compatible routines such as:
- Docker
- Containerd
- Cri-o
- Rkt
- Runc
Well, what else does it bring us to have the application ready to run in a container?
We can take advantage of the above mentioned with the previous routines and stand-alone managers such as docker from orchestrators such as:
- Docker-swarm (it is not the most used)
- Kubernetes (the orchestrator most used)
This type of orchestrators provide great advantages for our application, such as high availability, scalability, monitoring, flexibility, etc. They provide an extra abstraction layer that makes it easier to manage networks, volumes, instance management, and everything related to container management.
For example, using Kubernetes you can have an application in production and have it scale based on CPU or RAM usage. You can also make sure that there are a certain number of instances. And most importantly, you can deploy without causing a disaster by very quickly managing a rollback if necessary.
Conclusions
Just a few years ago the industry in general only saw this as viable for non-production environments (except for the most daring) but recently we are seeing more and more widespread adoption of this type of technology. In fact, the vast majority of the major cloud technology players have implemented cloud-related services.