diff --git a/04-daemonset/daemonset-with-labels.yaml b/04-daemonset/daemonset-with-labels.yaml new file mode 100644 index 0000000..134211c --- /dev/null +++ b/04-daemonset/daemonset-with-labels.yaml @@ -0,0 +1,23 @@ +--- +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: nginx-daemonset + labels: + app: &app nginx +spec: + selector: + matchLabels: + name: nginx-daemonset + template: + metadata: + labels: + name: nginx-daemonset + spec: + nodeSelector: + role: nginx + containers: + - image: nginx:1.28.2-alpine + name: nginx-daemonset + ports: + - containerPort: 80 diff --git a/04-daemonset/daemonset-with-toleration.yaml b/04-daemonset/daemonset-with-toleration.yaml new file mode 100644 index 0000000..8cf0ac0 --- /dev/null +++ b/04-daemonset/daemonset-with-toleration.yaml @@ -0,0 +1,24 @@ +--- +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: nginx-daemonset + labels: + app: &app nginx +spec: + selector: + matchLabels: + name: nginx-daemonset + template: + metadata: + labels: + name: nginx-daemonset + spec: + tolerations: + - key: node-role.kubernetes.io/control-plane + effect: NoSchedule + containers: + - image: nginx:1.28.2-alpine + name: nginx-daemonset + ports: + - containerPort: 80 diff --git a/04-daemonset/daemonset.yaml b/04-daemonset/daemonset.yaml new file mode 100644 index 0000000..e8a022e --- /dev/null +++ b/04-daemonset/daemonset.yaml @@ -0,0 +1,21 @@ +--- +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: nginx-daemonset + labels: + app: &app nginx +spec: + selector: + matchLabels: + name: nginx-daemonset + template: + metadata: + labels: + name: nginx-daemonset + spec: + containers: + - image: nginx:1.28.2-alpine + name: nginx-daemonset + ports: + - containerPort: 80