What is container orchestration?
Docker works well on a single machine, but what if you need to deploy thousands of containers across many different machines? This is what container orchestration aims to do: to schedule, deploy, and manage hundreds or thousands of containers across your environment. There are several platforms that attempt to do this:
- Docker Swarm: A cluster management and orchestration solution from Docker (https://docs.docker.com/engine/swarm/).
- Kubernetes (K8s): An open source container orchestration system, originally designed by Google and now maintained by CNCF. Thanks to active contributions from the open source community, Kubernetes has a strong ecosystem for a series of solutions regarding deployment, scheduling, scaling, monitoring, and so on (https://kubernetes.io/).
- Amazon Elastic Container Service (ECS): A highly secure, reliable, and scalable container orchestration solution provided by AWS. With a similar concept as many other orchestration systems, ECS also makes it easy to run, stop, and manage containers and is integrated with other AWS services such as CloudFormation, IAM, and ELB, among others (see more at https://ecs.aws/).
The control/data plane, a common architecture for container orchestrators, is shown in the following diagram:
Figure 1.4 – An overview of container orchestration
Container orchestration usually consists of the brain or scheduler/orchestrator that decides where to put the containers (control plane), while the worker runs the actual containers (data plane). The orchestrator offers a number of additional features:
- Maintains the desired state for the entire cluster system
- Provisions and schedules containers
- Reschedules containers when a worker becomes unavailable
- Recovery from failure
- Scales containers in or out based on workload metrics, time, or some external event
We’ve spoken about container orchestration at the conceptual level, now let’s take a look at Kubernetes to make this concept real.