레플리카셋과 데몬셋 비교

데몬셋 생성

apiVersion: apps/v1
kind: DaemonSet
metadata:
	name: sample-ds
spec:
	selector:
		matchLabels:
			app: sample-app
	template:
		metadata:
			labels:
				app: sample-app
		spec:
			containers:
			- name: nginx-container
				image: nginx:1.16

데몬셋 업데이트 전략

OnDelete

apiVersion: apps/v1
kind: DaemonSet
metadata:
	name: sample-ds-ondelete
spec:
	updateStrategy:
		type: OnDelete
	selector:
		matchLabels:
			app: sample-app
	template:
		metadata:
			labels:
				app: sample-app
		spec:
			containers:
			- name: nginx-container
				image: nginx:1.16

RollingUpdate