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: