Skip to content
Go back

80/20 Of The Week: Docker Compose and Kubernetes

Edit page

80/20 Of The Week 🗣️ … Docker Compose and Kubernetes (Official)

They are not actually “competitors” since they’re really on different “levels”:

They are kinda like imperative and declarative programming in that sense.

1) Compose is “imperative”

Compose is basically you telling the machine: “Start these services. Use these ports. Mount these volumes. Connect this network.”

It’s like writing instructions step-by-step (the yaml is still declarative but operationally it is kinda imperative cos you’re still “driving” the runtime).

Analogy: “Do A, then do B, then do C.” It’s great when it’s small but you’re kind of the “operator”… if something breaks, you usually go fix it manually.

2) Kubernetes is “declarative”

Kubernetes is you describing the end goal: “I want 3 replicas of this service. It should be reachable by a service name. Rolling updates. Auto-heal if a pod dies.”

You don’t tell it how to do it step-by-step. You describe what you want, and the system continuously tries to make reality match your spec.

Analogy: You don’t say “loop over servers and restart stuff”. You say “desired state = 3 running”. THEN the control plane keeps reconciling until it’s true. That’s why people say Kubernetes is a “platform”, not just a tool.

3) Kubernetes is a concept + API… with different implementations

Kubernetes isn’t “one product” like Compose. It’s more like a standard or an interface in programming languages (an API + behavior).

Then you have many real-world ways to run it:

Same concept, different packaging + defaults + integrations.

Compose is “run my containers” where Kubernetes is “run my system” … and it is important to note that Docker does have Docker Swarm which is a more Kubernetes-ish alternative.

To go over all the things Kubernetes supplies, I would prolly need a whole post on its own, but the neat thing about almost all of it is that it automates a lot, so once you set it up, it mostly just hustles everything on its own 😃

Docker and Kubernetes


Edit page
Share this post on:

Previous Post
80/20 Of The Week: Event-Driven Architecture (EDA)
Next Post
80/20 Of The Week: Basic MLs (Linear Regression and GBDT)