k8s/StudyNotes/ DaemonSets
- One copy of pod on all nodes in cluster.
kubectl get daemonset <name> kubectl describe daemonset <name>
DaemonSet definition file similar to ReplicaSet
apiVersion: apps/v1 kind: DaemonSet metadata: name: mon-daemonset spec: selector: matchLabels: ... templates: metadata: labels: ... spec: containers: ...
- Uses default scheduler and node affinity to place daemons on nodes.
To create a new daemonset template from Deployment
kubectl create deployment <name> --image=<image> --namespace=kube-system --dry-run=client -o yaml > ds.yaml # edit and change kind to DaemonSet, remove unused settings, eg. replicas , strategy ...