From d961c9ce6e009022e3e9ddd8ce1424238daa1457 Mon Sep 17 00:00:00 2001 From: B4D_US3R Date: Thu, 19 Mar 2026 12:07:56 +0500 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=BF=D1=80=D0=B8=D0=BC=D0=B5=D1=80=D1=8B=20daemonset?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 04-daemonset/daemonset-with-labels.yaml | 23 ++++++++++++++++++++ 04-daemonset/daemonset-with-toleration.yaml | 24 +++++++++++++++++++++ 04-daemonset/daemonset.yaml | 21 ++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 04-daemonset/daemonset-with-labels.yaml create mode 100644 04-daemonset/daemonset-with-toleration.yaml create mode 100644 04-daemonset/daemonset.yaml 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