0
0
Kubernetesdevops~3 mins

Why DaemonSets for per-node workloads in Kubernetes? - Purpose & Use Cases

Choose your learning style9 modes available
The Big Idea

What if you never had to log into each computer again to run your helper program?

The Scenario

Imagine you have a cluster with many computers (nodes), and you want to run a small helper program on each one to watch or manage something important.

You try to log into each computer one by one and start the program manually.

The Problem

This manual way is slow and boring because you must repeat the same steps on every computer.

You might forget some computers or make mistakes, causing problems later.

Also, when new computers join the cluster, you have to remember to do it again.

The Solution

DaemonSets automatically run a copy of your helper program on every computer in the cluster.

They keep track of new computers and make sure the program runs there too, without you lifting a finger.

Before vs After
Before
ssh node1
start-helper
ssh node2
start-helper
...
After
kubectl apply -f daemonset.yaml
# DaemonSet runs helper on all nodes automatically
What It Enables

You can easily ensure important tools run everywhere in your cluster, keeping your system healthy and consistent.

Real Life Example

Running a monitoring agent on every node to collect data about CPU and memory usage, so you always know how your cluster is performing.

Key Takeaways

Manual setup on each node is slow and error-prone.

DaemonSets automate running programs on all nodes.

This keeps your cluster consistent and easier to manage.