Skip to main content

Command Palette

Search for a command to run...

DaemonSet Explained

Published
1 min read
DaemonSet Explained

DaemonSet in kubenetes are objects the create a singe pod instance per node unlike deployments where you specify pod replica number, then based on the resource available in the nodes the pods could be created in one or more nodes, Provide the replica number is fulfilled.

Example of deamonset in acluster are

  • kube-proxy

  • calico

  • weave-net

some common use cases include

  • Monitoring agent

  • Logging agents

Here is a example Yaml for a simple DaemonSet

apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: my-ds
  labels:
    env: demo
spec:
  template:
    metadata:
      name: nginx-pod
      labels:
        env: demo
    spec:
      containers:
        - image: nginx
          name: nginx
          ports:
            - containerPort: 80
  selector:
    matchLabels:
      env: demo