Guia-Tutorial-kubernetes/yaml-del-pelado/05-statefulset.yaml

35 lines
634 B
YAML
Raw Normal View History

2022-09-19 18:31:05 +02:00
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: my-csi-app-set
spec:
selector:
matchLabels:
app: mypod
serviceName: "my-frontend"
replicas: 1
template:
metadata:
labels:
app: mypod
spec:
containers:
- name: my-frontend
image: busybox
args:
- sleep
- infinity
volumeMounts:
- mountPath: "/data"
name: csi-pvc
volumeClaimTemplates:
- metadata:
name: csi-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: do-block-storage