DaemonSets:


A DaemonSet is a kubernetes controller that ensures that one copy of a certain pod is running on each node of the cluster.

Programs that collect data are a good candidate for this. For example fluentd and Logstash.
Their purpose is to run daemon processes.

A Daemonset also guarantees that if we add a node to the cluster, the new node will also run a copy of the daemonSet pod.

Daemonsets and deplyoments:

A deployment will restart a pod on another node if the node on which the pod is running crashes.

daemonSet would not, because it only runs one copy of a pod on each node.

Remark:

DaemonSets are not taken into account by the kubernetes Scheduler.

Below is the Yaml configuration file "daemonset_1.yaml" for the a DaemonSet for "fluend" pod, deployed in the "kube-system" namespace:


We then deploy our DeamonSet using the below command:


A systemd service could be used as an alternative to a DeamonSet.
Brando Sabatini and Ikbal C ©. Powered by Blogger.