Kubernetes vs. Docker: Understand containers and orchestration


If you’ve kept up with the latest trends in software development, there are two terms you’ve undoubtedly encountered again and again:  and , which are essentially shorthand for containers and orchestration.

Docker containers have helped streamline the process of moving applications through development and testing and into production, while both Docker and Kubernetes have helped to reinvent the way applications are built and deployed—as collections of microservices instead of monolithic stacks.

Why are Docker and Kubernetes important, how are they changing software development, and what role does each play in the process? I’ll try to answer those questions below.

Docker and containers

Containers—supported in Linux, Windows, and other modern operating systems—allow software to run in self-contained mini-environments that are isolated from the rest of the system. Containers have been likened to VMs, but they’re not VMs—they’re far leaner, faster to start and stop, and much more flexible and portable. Because containers can be spun up or down or scaled in or out in seconds, they make it easier to run apps in elastic environments like the cloud. 

Linux and other operating systems have supported containerized apps for many years, but working with containers was not exactly user-friendly. Docker, in both its open source and commercial incarnations, is software that makes containers a user-friendly and developer-friendly commodity. Docker provides a common set of tools and metaphors for containers so that you can package apps in container images that can be easily deployed and re-used in your own organization or elsewhere.

In short, Docker makes it a snap to create container images, version them, share them, move them around, and deploy them to Docker-compatible hosts as running containers.

 produced by name-brand firms (Red Hat, Canonical, Docker) that work hand-in-hand with popular application stacks and development frameworks.

When do I use Kubernetes and container orchestration?

Simple containerized apps that serve a small number of users typically don’t require orchestration, let alone Kubernetes. But if an app has more than a trivial level of functionality or a trivial number of users, it becomes hard not to reinvent the wheel provided by orchestration systems. Here are some rules of thumb for determining when orchestration should enter the picture.

rather than Kubernetes.

  • Your apps have high demands for scaling and resilience. Kubernetes and other orchestrators let you balance loads and spin up containers to meet demand declaratively, by describing the desired state of the system instead of coding reactions to changing conditions by hand.
  • You want to make the most of modern CI/CD techniques. Orchestration systems support deployment patterns for apps using blue/green deployment or rolling upgrades.
  • There may come a day when Docker and Kubernetes are eclipsed by even friendlier abstractions, and give way to more elegant ways to create and manage containers. For now, though, Docker and Kubernetes are crucial to know and understand.

    Learn more about Kubernetes and orchestration