May 2018
Intermediate to advanced
554 pages
13h 51m
English
If a Kubernetes DaemonSet is created, the defined Pod will be deployed in every single node. It is guaranteed that the running containers occupy equal resources in each node. In this scenario, the container usually works as the daemon process.
For example, the following template has an Ubuntu image container that keeps checking its memory usage half a minute at a time:
$ cat daemonset-free.yamlapiVersion: apps/v1kind: DaemonSetmetadata: name: ram-checkspec: selector: matchLabels: name: checkRam template: metadata: labels: name: checkRam spec: containers: - name: ubuntu-free image: ubuntu command: ["/bin/bash","-c","while true; do free; sleep 30; done"] restartPolicy: ...
Read now
Unlock full access