This commit is contained in:
Jarosław Karcewicz 2022-04-05 19:45:59 +02:00
parent 95f2d5f1b4
commit 56f1a6edc4
3 changed files with 29 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -1,7 +1,7 @@
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: nginx-headless name: nginx-uslugasts
labels: labels:
run: nginx-sts run: nginx-sts
spec: spec:
@ -18,7 +18,7 @@ kind: StatefulSet
metadata: metadata:
name: nginx-sts name: nginx-sts
spec: spec:
serviceName: "nginx-headless" serviceName: "nginx-uslugasts"
replicas: 4 replicas: 4
selector: selector:
matchLabels: matchLabels: