Part-93: 🚀 To Implement the K8s DaemonSets in Google Kubernetes Engine (GCP)

If you’ve been working with Deployments in Kubernetes, you know they’re great for running workloads across multiple Pods.
But what if you need one Pod running on every Node in your cluster? 🤔

That’s where DaemonSets come in.

🔹 What is a Dae…


This content originally appeared on DEV Community and was authored by Latchu@DevOps

If you’ve been working with Deployments in Kubernetes, you know they’re great for running workloads across multiple Pods.
But what if you need one Pod running on every Node in your cluster? 🤔

That’s where DaemonSets come in.

🔹 What is a DaemonSet?

A DaemonSet ensures that:

  • Every Node in your cluster runs a copy of a specific Pod
  • When new Nodes are added, Kubernetes automatically places the Pod on them
  • When Nodes are removed, those Pods are also removed
  • Deleting a DaemonSet cleans up all Pods it created

d1

Think of a DaemonSet as:

👉 “One Pod per Node — always.”

🔹 Real-World Use Cases of DaemonSets

DaemonSets are not for running user apps. Instead, they’re used for cluster-level tasks such as:

  • 📦 Storage Daemons

Example: Run a storage agent like Ceph or GlusterFS on every node.

  • 📜 Log Collection Daemons

Example: Run Fluentd, Logstash, or Filebeat on every node to collect and ship logs.

  • 📊 Monitoring Daemons

Example: Run Prometheus Node Exporter or Datadog Agent on every node to collect CPU, memory, and disk metrics.

Implement DaemonSets

Step-01: 📌 Create a file: daemonset.yaml

apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: myapp1-daemonset
  namespace: default
  labels:
    app: myapp
spec:  
  selector:
    matchLabels:
      app: myapp
  template:
    metadata:
      labels:
        app: myapp
    spec:
      containers:
      - name: myapp-container
        image: ghcr.io/stacksimplify/kubenginx:1.0.0

Step-02: Deploy and Verify

# Deploy Kubernetes Resources
kubectl apply -f kube-manifests/daemonset.yaml

# Verify DaemonSet
kubectl get daemonset
kubectl get ds

# Verify Pods
kubectl get pods -o wide

Observation: 
1. Verify if pods got scheduled on Nodes created for NodePool:linuxapps-nodepool
NodePool:default

d2

Step-3: Clean-Up

# Delete Kubernetes Resources
kubectl delete -f kube-manifests/daemonset.yaml

# Delete Node pool 
gcloud container node-pools delete "linuxapps-nodepool" \
  --cluster "standard-public-cluster-1" \
  --location "us-central1"

d3

🔹 Quick Recap

  • DaemonSets ensure Pods run on every Node in your cluster.
  • Great for system-level services like logging, monitoring, and storage.
  • Automatically scale with your cluster (add/remove nodes).

✅ That’s it! Now you know when and why to use DaemonSets in Kubernetes.

🌟 Thanks for reading! If this post added value, a like ❤️, follow, or share would encourage me to keep creating more content.

— Latchu | Senior DevOps & Cloud Engineer

☁️ AWS | GCP | ☸️ Kubernetes | 🔐 Security | ⚡ Automation
📌 Sharing hands-on guides, best practices & real-world cloud solutions


This content originally appeared on DEV Community and was authored by Latchu@DevOps


Print Share Comment Cite Upload Translate Updates
APA

Latchu@DevOps | Sciencx (2025-09-27T10:09:09+00:00) Part-93: 🚀 To Implement the K8s DaemonSets in Google Kubernetes Engine (GCP). Retrieved from https://www.scien.cx/2025/09/27/part-93-%f0%9f%9a%80-to-implement-the-k8s-daemonsets-in-google-kubernetes-engine-gcp/

MLA
" » Part-93: 🚀 To Implement the K8s DaemonSets in Google Kubernetes Engine (GCP)." Latchu@DevOps | Sciencx - Saturday September 27, 2025, https://www.scien.cx/2025/09/27/part-93-%f0%9f%9a%80-to-implement-the-k8s-daemonsets-in-google-kubernetes-engine-gcp/
HARVARD
Latchu@DevOps | Sciencx Saturday September 27, 2025 » Part-93: 🚀 To Implement the K8s DaemonSets in Google Kubernetes Engine (GCP)., viewed ,<https://www.scien.cx/2025/09/27/part-93-%f0%9f%9a%80-to-implement-the-k8s-daemonsets-in-google-kubernetes-engine-gcp/>
VANCOUVER
Latchu@DevOps | Sciencx - » Part-93: 🚀 To Implement the K8s DaemonSets in Google Kubernetes Engine (GCP). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/09/27/part-93-%f0%9f%9a%80-to-implement-the-k8s-daemonsets-in-google-kubernetes-engine-gcp/
CHICAGO
" » Part-93: 🚀 To Implement the K8s DaemonSets in Google Kubernetes Engine (GCP)." Latchu@DevOps | Sciencx - Accessed . https://www.scien.cx/2025/09/27/part-93-%f0%9f%9a%80-to-implement-the-k8s-daemonsets-in-google-kubernetes-engine-gcp/
IEEE
" » Part-93: 🚀 To Implement the K8s DaemonSets in Google Kubernetes Engine (GCP)." Latchu@DevOps | Sciencx [Online]. Available: https://www.scien.cx/2025/09/27/part-93-%f0%9f%9a%80-to-implement-the-k8s-daemonsets-in-google-kubernetes-engine-gcp/. [Accessed: ]
rf:citation
» Part-93: 🚀 To Implement the K8s DaemonSets in Google Kubernetes Engine (GCP) | Latchu@DevOps | Sciencx | https://www.scien.cx/2025/09/27/part-93-%f0%9f%9a%80-to-implement-the-k8s-daemonsets-in-google-kubernetes-engine-gcp/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.