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.
DaemonSet
It 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.
DaemonSet
The main features are as follows:
- Run a copy of the Pod on each node in the cluster.
- Automatically monitor and manage node joining and exiting events.
- With Pod update and rollback functions.
- 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符合标签条件