Stateful and Stateless Application:
Stateful vs Stateless: Full Difference - InterviewBit
StatefullSet:
DeamonSet:
Daemon Set runs a Copy of a Pod on New Node as they added to Cluster automatically.
DaemonSet will be helpful in case of Monitoring, Log Collection, Proxy Configuration etc.
=============================
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: logging
spec:
selector:
matchLabels:
app: httpd-logging
template:
metadata:
labels:
app: httpd-logging
spec:
containers:
- name: webserver
image: httpd
ports:
- containerPort: 80
DaemonSet
A DaemonSet ensures that all (or some) Nodes run a copy of a Pod. As nodes are added to the cluster, Pods are added to them. As nodes are removed from the cluster, those Pods are garbage collected. Deleting a DaemonSet will clean up the Pods it created.
Some typical uses of a DaemonSet are:
- running a cluster storage daemon on every node
- running a logs collection daemon on every node
- running a node monitoring daemon on every node
No comments:
Post a Comment