Originally posted on thenewstack.
Docker is a technology for bundling applications into containers, so they can be moved into production. Kubernetes allows users to run entire clusters of containers as a single unit.
Kubernetes won soundly, in the battle between Kubernetes vs. Docker. Kubernetes today casts a fearsome shadow over all of production-grade IT; Docker’s bits are scattered across different open source code repositories and premium subscription plans.
Tis’ a pity because developers, at least back in 2014, loved 💕 Docker. And, today, developers largely have no love for Kubernetes.
The debate over “Kubernetes versus Docker” continues to be a hot topic, according to Google search queries. Which is probably why you are reading this right now. Why would someone ever type something like “Kubernetes vs. Docker” into a search engine? But many do.
So here we both are, and it is our pleasure to edutain you on all things Kubernetes, Docker, and their union.
Does Kubernetes Need Docker?
Traditionally, the activities of developers, or “devs” as they are known, have not been of much interest from the titans of industry innovation. “Devs” don’t have much buying authority, just sitting there, coding all the time. When Steve Ballmer chanted “Developers, Developers, Developers” in 2008, it was desperate a plea for devs to jump onto the Windows platform, forever in its own losing turf war with the internet (this was before the IT industry recognized developers themselves would be the hot commodity).
But devs are great in number, and when Docker scratched an itch, developers responded warmly, as would a giant lion when a thorn is removed from its mighty paw.
The thorn was the difficulty of getting their code, once fully developed, to run in a production environment. All these configuration changes had to be made to meet the requirements in production. It was a hassle.
Instead of moving to copy an application, along with its libraries into a varying environment, with Docker, the dev could put the whole app, and its trimmings, into a container, and let the other system run the container, not the app.
Ezy Pezy. Rejoicing ensued.
Docker and Containers
In 2015, Docker was the cool kid in the room, and it made the older, huskier kids a bit uneasy.
Such as the operations folks, maybe, who were spooked by some of the wayward practices made by the keeper of Docker, whose mantra was “batteries-included-but-swappable.” Operations are those IT pros who play the critical role of “ops” in “DevOps.” Docker’s coding practices were a bit unpredictable, they argued.
Also, they grumbled, a container is just a set of Unix commands. Sun Microsystems had containers in its own product catalog for a good decade, IBM had them for mainframes since the 1970s. Even open source enterprise software giant Red Hat had LLVM in its repository. , they even agitated that
A few companies, completely independently, even vigorously lobbied the open source community that the Docker code, already open source, should be handed over to a standards body. Sensing the force of the resistance, Docker obliged.
Is Kubernetes Better than Docker?
Atlassian, in its own take on the Docker vs. Kubernetes controversy, describes the difference between the two as Docker just being a container runtime, while Kubernetes is an entire platform for running container runtimes:
While Docker is a container runtime, Kubernetes is a platform for running and managing containers from many container runtimes. Kubernetes supports numerous container runtimes including Docker, containerd, CRI-O, and any implementation of the Kubernetes CRI (Container Runtime Interface)
As of release 1.24, Kubernetes no longer supports the Docker runtime, though Docker containers themselves run fine on Kubernetes.
Just as people use Xerox as shorthand for paper copies and say “Google” instead of internet search, Docker has become synonymous with containers. Docker is more than containers, though. Docker is a suite of tools for developers to build, share, run and orchestrate containerized apps.
Can Kubernetes Replace Docker?
Back to 2015: Over at the Googleplex, some Google engineers thought it would be a good idea if everyone organized their massive data centers in the same way Google did. This manifested itself into something called Kubernetes, a knockoff of an internal resource scheduler called — we kid you not — The Borg.
Fortunately, Google hired a person from our own planet — the always brilliant Kelsey Hightower — to explain this “Kubernetes” to container users, who were increasingly befuddled by the growing numbers of containers they had on hand. Hightower made it look so easy, spinning up a cluster on stage, by voice command on his phone, while making jokes in front of thousands of skeptical onlookers.
And so it was agreed upon by all parties: Cattle not pets. Cloud native computing was born.
Kubernetes and Docker are two different software packages, and serve different purposes. Today, Docker, the company, provides a great range of desktop tools for developers to build containers. It even has its own competitor to Kubernetes, called Docker Swarm, which has been praised for its ease of use.
In 2019, Docker sold off a portion of its assets to Mirantis, which continues to offer the Docker Enterprise platform. Kubernetes, on the other hand, is offered as a service by all the largest cloud providers. Amazon Web Services‘ Amazon Kubernetes Service is one such example.
In a sense, Docker and Kubernetes are like the farmer and the cattle rancher, respectively. Each has a different role on the farm, and each uses the farm’s fields for a different purpose. But this is no reason they can’t be friends.