Amit Joshi:
Hello Buddies,
I am new to K8S. I am learning the concept of Daemonsets. I understood the difference between Daemonset and Replicaset. However,
- I did not understand the actual use case of Daemonsets.
- Which pod’s copy does the Daemonset maintains on every worker node?
- Is the copy of the pod present on every node consumes the hardware resources?
Mohamed Ayman:
Hello @Amit Joshi
- Mostly used to collect the logs on the all nodes. the Daemonset make sure that every node has 1 replica/copy of the pod
- Can you clarify it?
- yes
Sara:
for example kube proxy has to be daemonset as it must be on each node. right Ayman?
Amit Joshi:
That’s true!
The documentation says DaemonSet is used for log collection, cluster storage, and monitoring. I did not understand How?
Sara:
i guess because we want one log collector to be running on each node always. whatever that collector is. and this can be achieved only by deamonsets and the same for monitoring.
unnivkn:
Hi @Amit Joshi let us say you need to monitor all the nodes of a k8s cluster, using a monitoring agent like Datadog. So in this scenario, you have to deploy Datadog monitoring agent to each & every node. So the approach here is to create a Datadog Daemonset, so that each node will be deployed it’s agent to monitor the nodes. [Daemonset make sure that every node has 1 replica/copy of the pod]. Hope this helps
Amit Joshi:
Cool! These comments made it crystal clear. Thanks!