Docker and k8s: Static Pods vs. DaemonSet

Peter Jeon·2023년 5월 8일

Docker and k8s

목록 보기
32/41

Kubernetes

In this blog post, we'll explore the differences between Static Pods and DaemonSets in the context of Docker and Kubernetes.

FeatureStatic PodsDaemonSet
DeploymentDirectly on the nodeVia the API server
ManagementManaged by the kubeletManaged by the Kubernetes control plane
Configuration file locationNode's filesystemKubernetes API
Node failure impactPod is not rescheduledAutomatically rescheduled
ScalingManual scalingAutomatic scaling with node addition
Rolling updates and rollbacksNot natively supportedSupported
Node-specific configurationTied to specific nodesIndependent of nodes
Use casesSystem daemons, cluster maintenanceCluster-wide system daemons

Static Pods

Static Pods

Static Pods are managed directly by the kubelet on each node without the involvement of the Kubernetes API server. They are created by placing a Pod definition in a specific directory on the node, and the kubelet will automatically create the Pod. Static Pods are tied to a specific node and will not be rescheduled if the node fails.

Use cases

Static Pods are primarily used for running system daemons or other cluster maintenance tasks on specific nodes.

DaemonSet

A DaemonSet is a higher-level abstraction that ensures a Pod is running on all (or a subset of) nodes in a Kubernetes cluster. When a new node is added to the cluster, the DaemonSet automatically creates a new Pod on the node. If a node is removed, the corresponding Pod is also deleted. DaemonSets are managed by the Kubernetes control plane and are not tied to specific nodes.

Use cases

DaemonSets are typically used for running cluster-wide system daemons like log collectors, monitoring agents, or storage providers.

In conclusion, while Static Pods and DaemonSets have some similarities, they serve different purposes and have different management models. Choose the one that best suits your specific use case and requirements.

profile
As a growing developer, I am continually expanding my skillset and knowledge, embracing new challenges and technologies

0개의 댓글