⒈DaemonSet introduction, what is DaemonSet
DaemonSet sure to run a Pod on all (or some) Node [Note copy of the master node does not participate in scheduling]. When Node joins the cluster will add a Pod for them. When a Node is removed from the cluster, the Pod will be recovered. Delete DaemonSet will delete all its created Pod
Use of some typical usage DaemonSet:
· Run clustered storage daemon, such as running glusterd on each Node, ceph
· Log collection daemon running on each Node, for example fluentd, logstash
· Monitoring daemon runs on each Node, such as Prometheus Node Exporter, collectd, Datadog agency, New Relic agent, or Ganglia gmond
⒉DaemonSet resource file example
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: deamonset-example
labels:
app: daemonset
spec:
selector:
matchLabels:
name: deamonset-example
template:
metadata:
1abels:
name: deamonset-example
spec:
containers:
- name: daemonset-example
image: fanqisoft/myapp:v1
⒊