- 12 Feb 2024
- 3 Minutes to read
- Updated on 12 Feb 2024
- 3 Minutes to read
This article includes a brief introduction to the following topics,
Container and its importance
Container Orchestration (AKS & EKS)
A container is a package that contains the code, configurations to the code, and all its dependencies to run the application or service within an isolated environment. Containers are based on Linux architecture. A container can be launched by pulling and running the Container Image. A Container Image is a static file that includes the executable code to run the service. Container Image becomes container during runtime. Container Images are stored in a private or public registry on a cloud Repository like Docker Hub, Amazon's Elastic Web Services, Azure Container Instances, etc.
To learn more about Containers, refer to the article by Docker.
How is a Container different from a Virtual Machine (VM)?
Container and VM have the same goal to run the application or service in an isolated environment.
Virtual Machine (VM)
VMs or Virtual Machines use hardware virtualization of the host computer. Hardware Virtualization is an abstraction of physical hardware (RAM, Memory, CPU, etc.) from the host machine to create another machine. It needs an operating system and a Kernel of its own.
Container, on the other hand, uses Operating System virtualization, where it shares the hardware, kernel, and OS of the host computer with other containers. Hence, there is no need to install an operating system in a container. This makes Containers very fast and lightweight.
Why use containers over virtual machines?
The most important use case of an application or a service is its ability to scale within a business unit. Horizontal scaling with the VMs is complex and time-consuming, but with the help of containers, the process becomes easy and quick.
Passing Environment Variable to containers
Users need to configure multiple settings (file storage location, connection string, etc.) with the help of an installer while installing an application. But containers run with predefined configurations set in the container image. Using Environment Variables in CLI or passing the env.list path will help the user to set the dynamic configuration to containers before running the container image as a container.
To learn more about environment variables, refer to Environment variables with Compose.
Container orchestration is the automated process of deploying, auto-scaling, and managing containers as needed. Orchestration comes into the picture when the containers are running in Cluster. Clustering is a process where multiple containers (even thousands) running simultaneously will use the same database or file storage to run the applications.
Decisions containers are built to be managed by container services like Kubernetes, Amazon Kubernetes Services, Azure Kubernetes Services, etc.
How does Containers Orchestration work?
Depending upon the orchestration tool, a declarative configuration file is written in YAML or JASON format. This configuration file is written to define the desired configuration state, and the orchestration tool that runs the file uses its own intelligence to achieve that state.
The tool automatically deploys the containers to a host, choosing all the required hardware for the containers specified in the configuration file.
Once the containers are deployed, the orchestration tool manages everything based on the declarative configuration file.
Container Orchestration tools supported by Decisions
Kubernetes is an open-source and the most popular container orchestration platform used globally. It allows developers to effortlessly create containerized applications and services and scale, schedule, and monitor containers. To learn more about Kubernetes and its configuration, refer to the Kubernetes Official Website.
Amazon's Elastic Kubernetes Service (EKS)
Amazon EKS is a managed Kubernetes Service to run Kubernetes in AWS cloud or on-premises. EKS is a completely automated platform. EKS is a certified Kubernetes conformant, making it easy to run tooling and plugins developed by Kubernetes. To learn more about EKS, visit Amazon EKS.
Microsoft's Azure Kubernetes Services (AKS)
AKS is also a Managed Kubernetes Service similar to Amazon EKS, which is available on the Azure cloud. AKS can be used to handle scaling and managing containers and container-based applications. To learn more about AKS, visit Azure Kubernetes Services.
To learn the architecture, prerequisites, and any platform restrictions on containers, refer to Decisions Container.