Goodbye docker-compose, Hello Kubelet?

Bruno Teixeira
6 min readJan 2, 2022

Introduction

In a typical Kubernetes architecture, the Kubelet is the main agent that runs in all worker nodes and sometimes even the control-plane nodes (more on this later).

It registers itself against a Kubernetes Cluster and is responsible for creating, updating and deleting the containers (or pods) running in the target host. The Kubelet receives instructions from various sources and ensures that the desired state is applied in the target host.

But, did you know that the Kubelet can run in standalone mode? By standalone, we mean that the Kubelet can perform almost all of its functions without any input from an external source.

This presents a potential alternative to docker-compose.

Static Pods — The Forbidden Knowledge

While not ancient or lost knowledge by itself, the Kubelet possesses an interesting feature that has been baked in for years at this point, but it’s not really common knowledge.

This feature is known as Static Pods.

It allows the user to essentially declare a PodSpec, just like you would when applying it against an Api Server, except this time, this spec file will live on locally in a predetermined folder path.

--

--

Bruno Teixeira

Principal Cloud Engineer with a distributed system’s background, a passion for working with the bleeding edge and an unhealthy obsession for automation.