50 lines
1.0 KiB
YAML
50 lines
1.0 KiB
YAML
|
apiVersion: apps/v1
|
||
|
kind: StatefulSets
|
||
|
metadata:
|
||
|
name: example-nginx-slim
|
||
|
namespace: demo
|
||
|
labels:
|
||
|
name: nginx
|
||
|
app: nginx
|
||
|
type: statefulsets
|
||
|
spec:
|
||
|
serviceName: example-nginx-slim
|
||
|
replicas: 3
|
||
|
updateStrategy:
|
||
|
type: RollingUpdate
|
||
|
minReadySeconds: 0
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
name: nginx
|
||
|
app: nginx
|
||
|
type: pod
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
name: nginx
|
||
|
app: nginx
|
||
|
type: pod
|
||
|
spec:
|
||
|
terminationGracePeriodSeconds: 10
|
||
|
containers:
|
||
|
- name: nginx
|
||
|
image: nginx:1.23.3-alpine-slim
|
||
|
ports:
|
||
|
- name: http
|
||
|
containerPort: 80
|
||
|
- name: https
|
||
|
containerPort: 443
|
||
|
volumeMounts:
|
||
|
- name: html
|
||
|
mountPath: /usr/share/nginx/html
|
||
|
volumeClaimTemplates:
|
||
|
- metadata:
|
||
|
name: html
|
||
|
spec:
|
||
|
accessModes:
|
||
|
- ReadWriteOnce
|
||
|
storageClassName: example-storage-class-nginx-html
|
||
|
resources:
|
||
|
requests:
|
||
|
storage: 1Gi
|