35 lines
634 B
YAML
35 lines
634 B
YAML
|
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
|