DaemonSet
- Runs a copy of the pod specified in the yaml file on all or specified numbers of worker nodes in the cluster
- Useful for applications such as:
- Cluster Storage Daemon
- Log Aggregation
- Node Monitoring
DaemonSet Manifest File​
daemonset.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: fluentd-minimal
spec:
selector:
matchLabels:
app: fluentd
template:
metadata:
labels:
app: fluentd
spec:
containers:
- name: fluentd
image: fluentd:v1.16-1
After make the manifest file, we apply the manifest to create the DaemonSet
kubectl apply -f daemonset.yaml
Then check the daemonset that have been created
# Get daemonset
kubectl get ds
# Get daemonset pods that spread accross worker node
kubectl get pods -o wide