DaemonSet — one Pod per node. Ideal for observability agents.
Fluent Bit (logs):
1apiVersion: apps/v12kind: DaemonSet3metadata:4 name: fluent-bit5 namespace: observability6spec:7 selector:8 matchLabels:9 name: fluent-bit10 template:11 metadata:12 labels:13 name: fluent-bit14 spec:15 serviceAccountName: fluent-bit16 tolerations:17 - key: node-role.kubernetes.io/control-plane18 effect: NoSchedule19 containers:20 - name: fluent-bit21 image: fluent/fluent-bit:latest22 volumeMounts:23 - name: varlog24 mountPath: /var/log25 readOnly: true26 - name: containers27 mountPath: /var/lib/docker/containers28 readOnly: true29 - name: config30 mountPath: /fluent-bit/etc/31 volumes:32 - name: varlog33 hostPath:34 path: /var/log35 - name: containers36 hostPath:37 path: /var/lib/docker/containers38 - name: config39 configMap:40 name: fluent-bit-config
Node Exporter (node metrics):
1apiVersion: apps/v12kind: DaemonSet3metadata:4 name: node-exporter5spec:6 template:7 spec:8 hostNetwork: true9 hostPID: true10 containers:11 - name: node-exporter12 image: prom/node-exporter:latest13 args:14 - --path.procfs=/host/proc15 - --path.sysfs=/host/sys16 - --path.rootfs=/host/root17 volumeMounts:18 - name: proc19 mountPath: /host/proc20 readOnly: true21 - name: sys22 mountPath: /host/sys23 readOnly: true24 tolerations:25 - operator: Exists
Cilium (CNI + observability): DaemonSet with eBPF for network flows.
Problem with DaemonSet + spot instances: Use tolerations + priorityClass for guaranteed scheduling.