How to deploy a daemonset on a particular set of nodes in k8s cluster
Briefly

How to deploy a daemonset on a particular set of nodes in k8s cluster
"Kubernetes DaemonSets are a fantastic tool. They ensures that a copy of a Pod runs on every eligible node (or on selected nodes) in the cluster. It's commonly used for running node-level(cluster-wide) agents like log collectors (Fluentbit), monitoring agents (Prometheus Node Exporter, datadog), CNI networking plugins etc. But what if you want to run a DaemonSet only on specific nodes - for example, only on worker nodes with GPUs, or only on nodes in a particular zone or environment?"
"Labels & Selectors: The entire Kubernetes scheduling system works on a simple concept: labels and selectors. Labels: You your nodes with key-value pairs (e.g., hardware: gpu) Selectors: You tell your DaemonSet to only run on nodes that match this tag. There are two main ways to achieve this: nodeSelector (the simple way) and nodeAffinity (the powerful, flexible way). Step 1: Label the nodes"
Kubernetes DaemonSets ensure a copy of a Pod runs on every eligible node or on selected nodes in a cluster and are commonly used for node-level agents such as Fluentbit, Prometheus Node Exporter, Datadog, and CNI networking plugins. To run a DaemonSet only on specific nodes, use node labels combined with selectors. Node labeling assigns key-value pairs to nodes (for example hardware: gpu). nodeSelector provides a simple match against specific labels, while nodeAffinity offers more powerful and flexible selection rules. Prerequisites include a functioning Kubernetes cluster with multiple nodes and the kubectl CLI. The first step is labeling the target nodes.
Read at Medium
Unable to calculate read time
[
|
]