Typical application scenarios of DaemonSet - 5 minutes a day to play with Docker container technology (129)

The replica Pods deployed by the Deployment will be distributed on each Node, and each Node may run several replicas. The difference with DaemonSets is that there is at most one replica running on each Node.

Typical application scenarios of DaemonSet are:

  1. Run a storage daemon, such as glusterd or ceph, on each node of the cluster.

  2. Run a log collection daemon, such as flunentd or logstash, on each node.

  3. Run a monitoring daemon, such as Prometheus Node Exporter or collectd, on each node.

In fact, Kubernetes itself is using DaemonSet to run system components. Execute the following command:

kubectl get daemonset --namespace=kube-system


DaemonSet  kube-flannel-ds and  kube-proxy are responsible for running the flannel and kube-proxy components on each node respectively.

Because flannel and kube-proxy are system components, you need to  --namespace=kube-system specify namespace  on the command line kube-system. default If not specified, only resources in the default namespace will be returned  .

In the next section, we analyze  kube-flannel-ds and  kube-proxy these two DaemonSets in detail.

books:

1. "Play with Docker container technology in 5 minutes a day"
https://item.jd.com/16936307278.html

2. "Play with OpenStack in 5 minutes a day"
https://item.jd.com/12086376.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325079821&siteId=291194637