From 56f1a6edc4aa509b8e80cf8ee9c8ffafd7c7f5a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaros=C5=82aw=20Karcewicz?= Date: Tue, 5 Apr 2022 19:45:59 +0200 Subject: [PATCH] . --- StatefullSet&DaemonSet/nginx-daemonset.yml | 16 ++++++++++++++++ StatefullSet&DaemonSet/nginx-rollingupdate.yml | 11 +++++++++++ StatefullSet&DaemonSet/sts-nginx.yml | 4 ++-- 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 StatefullSet&DaemonSet/nginx-daemonset.yml create mode 100644 StatefullSet&DaemonSet/nginx-rollingupdate.yml diff --git a/StatefullSet&DaemonSet/nginx-daemonset.yml b/StatefullSet&DaemonSet/nginx-daemonset.yml new file mode 100644 index 0000000..af35cd1 --- /dev/null +++ b/StatefullSet&DaemonSet/nginx-daemonset.yml @@ -0,0 +1,16 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: nginx-daemonset +spec: + selector: + matchLabels: + app: nginx-daemonset-app + template: + metadata: + labels: + app: nginx-daemonset-app + spec: + containers: + - image: nginx + name: nginx \ No newline at end of file diff --git a/StatefullSet&DaemonSet/nginx-rollingupdate.yml b/StatefullSet&DaemonSet/nginx-rollingupdate.yml new file mode 100644 index 0000000..cd8c9de --- /dev/null +++ b/StatefullSet&DaemonSet/nginx-rollingupdate.yml @@ -0,0 +1,11 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: labels: run: nginx name: wdrozenie-nginx +spec: + replicas: 3 + selector: + matchLabels: + run: nginx + strategy: + type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 1 minReadySeconds: 5 revisionHistoryLimit: 5 template: metadata: labels: run: nginx spec: containers: + - image: nginx:1.18 \ No newline at end of file diff --git a/StatefullSet&DaemonSet/sts-nginx.yml b/StatefullSet&DaemonSet/sts-nginx.yml index 3e048a6..d720b55 100644 --- a/StatefullSet&DaemonSet/sts-nginx.yml +++ b/StatefullSet&DaemonSet/sts-nginx.yml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Service metadata: - name: nginx-headless + name: nginx-uslugasts labels: run: nginx-sts spec: @@ -18,7 +18,7 @@ kind: StatefulSet metadata: name: nginx-sts spec: - serviceName: "nginx-headless" + serviceName: "nginx-uslugasts" replicas: 4 selector: matchLabels: