DaemonSets
DaemonSets ensure a copy of a pod runs on all (or some) nodes in the cluster.
DaemonSet - One Pod per Node
Mental Model
Like ensuring every classroom has a teacher. DaemonSets automatically add pods when nodes are added and remove them when nodes are removed, useful for monitoring agents, log collectors, or storage daemons.
YAML Example
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: fluentd
spec:
selector:
matchLabels:
name: fluentd
template:
metadata:
labels:
name: fluentd
spec:
containers:
- name: fluentd
image: fluentdCommon Misconceptions
- ✗DaemonSets run on control plane - FALSE: Only on worker nodes (usually)
- ✗DaemonSet pods can't be managed - FALSE: They're normal pods managed by DaemonSet controller
- ✗DaemonSets replace Deployments - FALSE: Used for different purposes
Key Takeaways
- • DaemonSets ensure a copy of a pod runs on all (or some) nodes in the cluster.
- • Like ensuring every classroom has a teacher. DaemonSets automatically add pods when nodes are added ...
- • Check the YAML example for implementation details
- • Be aware of the common misconceptions listed above