Understanding Kubernetes: Part 6 -DaemonSets
Last updated
Last updated
If you’ve been following our Kubernetes series 2025, welcome back! For new readers, check out Part 5:
A DaemonSet in Kubernetes ensures that a specific pod runs on all (or a subset of) nodes in a cluster. It is used to deploy services or components that need to run on every node to provide functionalities like logging, monitoring, or networking.
For example, if we need to collect logs from all nodes using Fluentd or monitor node metrics with Prometheus Node Exporter, we deploy a DaemonSet to ensure these pods run consistently across all nodes
DaemonSets automatically schedule one pod per node. They also manage pods dynamically; if a new node is added to the cluster, the DaemonSet automatically deploys the pod to it. Similarly, pods are removed when a node is removed. You can further control deployment using node selectors, tolerations, or affinity rules
In my previous role, I used DaemonSets to deploy Fluentd for log collection across our EKS cluster. This allowed us to stream application logs from all nodes to our centralized logging system seamlessly. We configured node affinity to target specific nodes, ensuring optimal resource usage
Here’s a simple YAML for deploying a DaemonSet:
Take your Kubernetes journey to the next level with the Master Kubernetes: Zero to Hero course! 🌟 Whether you’re a beginner or aiming to sharpen your skills, this hands-on course covers:
✅ Kubernetes Basics — Grasp essential concepts like nodes, pods, and services. ✅ Advanced Scaling — Learn HPA, VPA, and resource optimization. ✅ Monitoring Tools — Master Prometheus, Grafana, and AlertManager. ✅ Real-World Scenarios — Build production-ready Kubernetes setups.
🎓 What You’ll Achieve
💡 Confidently deploy and manage Kubernetes clusters. 🛡️ Secure applications with ConfigMaps and Secrets. 📈 Optimize and monitor resources for peak performance.
Don’t miss your chance to become a Kubernetes expert! 💻✨
🔥 Start Learning Now: [Join the Master Kubernetes Course]()
🚀 Stay ahead in DevOps and SRE! 🔔 and never miss a beat on Kubernetes and more. 🌟