Lab: Working With Kubernetes Daemonsets: Objective
Lab: Working With Kubernetes Daemonsets: Objective
Lab: Working With Kubernetes Daemonsets: Objective
Introduction
A Kubernetes DaemonSet is a container tool that ensures that all nodes (or a specific subset of
them, but we’ll get to that later) are running exactly one copy of a pod. DaemonSets will even
create the pod on new nodes that are added to your cluster!
When using Kubernetes, most of the time you don’t care where your pods are running, but
sometimes you want to run a single pod on all your nodes
In this Lab, you will learn below items:
Objective:
• Create DaemonSet
• Verify Daemonset
• Cleanup
1.1 Let us clone the git repository which contains manifests required for this exercise, by executing the
below command.
Output:
# cat -n ~/k8s-daemonset/daemonset.yaml
Output:
1.4 Let’s see verify the DaemonSet is created and ready, by executing below command.
Note: Daemonset by design schedules at least one pod running on each node of the cluster. If
we add another node to the cluster, then a pod will be scheduled in the new node. Due to
limitation of this demo cluster, we won’t be able to show this functionality.
1.6 Let’s clean up by deleting the DaemonSet, by executing the below command.