Continuous integration deployment-k8s-resource scheduling: DaemonSet

Continuous integration deployment-k8s-resource scheduling: DaemonSet

1. Introduction to DaemonSet

In Kubernetes, DaemonSet is a controller object used to run a copy of the Pod in the cluster. It ensures that a copy of the Pod is running on each node and is automatically updated when nodes join or leave the cluster.

DaemonSetIt is usually used to deploy some system-level services in the cluster, such as log collection, monitoring, network proxy, etc. They require a replica running on each node to be able to handle node-level tasks.

DaemonSetThe main features are as follows:

  1. Run a copy of the Pod on each node in the cluster.
  2. Automatically monitor and manage node joining and exiting events.
  3. With Pod update and rollback functions.
  4. You can use label selectors to control which nodes the DaemonSet runs on.

Creating one DaemonSet requires specifying a Pod template, which defines how one or more containers should run. The number of containers, images, commands, parameters, volume mounting, etc. can be specified in the Pod template. The Pod created in this DaemonSet is similar to other Pods and can define resource requests, restrictions, life cycle hooks, etc.

Use tag selectors in DaemonSet to control which nodes the Pod runs on. If a new node is added符合标签条件

Guess you like

Origin blog.csdn.net/linmengmeng_1314/article/details/133868901