Container orchestration is the practice and process of organizing containers and allocating resources to them at scale. This differs from containerization software, such as Docker, which creates and acts as a container’s runtime. Container orchestration software typically coordinates several virtual and physical machines each with its own containerization software installed.
Docker can run containerized applications by creating a virtualized container, deployed inside with an application and its required libraries, and with its own allocation of resources available on the machine where the container is running. This container believes it exists as a fully functioning machine, running a single app when it is a container among many other containers running microservices on a single hardware system within even further groupings of hardware. Container orchestration steps in to manage several of these container deployments, with the aim of scaling across multiple servers.
While there are several orchestration technologies—even Docker has theirs called Docker Swarm—Kubernetes is the most popular container orchestrator and works exceptionally well with Docker as its container creator.
Kubernetes, when deployed, creates a cluster (in Docker, the “swarm” is the similar cluster feature) which will have inside it several worker machines called nodes each running containerized applications. A node can be a VM or a physical machine. A cluster will also have a control plane that runs on its own node, though not necessarily, and provides decision-making capabilities for the entire cluster.
Nodes are made up of several components:
- A kublet agent that runs the node and ensures its containers are in a pod, and that they start and stop as expected.
- A kube-proxy allows and maintains communication to the pods inside and outside the cluster.
- A container runtime that runs the containers (Docker).
A pod is a grouping of running containers within the cluster. Because of virtualization, a pod is assigned an IP address, usually encompassing closely associated containers that are located on the same host/node for efficient resource sharing. This grouping allows the orchestrator to easily schedule, and use ports without conflicts.
Depending on the use case, clusters can be quite full. Kubernetes states that their clusters can hold up to 5000 nodes. Though in practice, this is not normal. In short, the container orchestrator is the piece of software that manages all of these components, virtual and physical, to ensure that resources are used and shared effectively and efficiently within a container architecture.