aapiVersionapiVersion: apps/v1
kind: StatefulSetPersistentVolumeClaim
metadata:
name: webfoo-pvc
spec:
selectorstorageClassName:
matchLabels:
app: nginx
serviceName: "nginx"
replicas: 3 # 기본값은 1
minReadySeconds: 10 # 기본값은 0
template:
metadata:
labels:
app: nginx
spec:
terminationGracePeriodSeconds: 10
containers:
- name: nginx
image: nginx:1.15.12
ports:
- containerPort: 80
name: web
volumeMounts:
- name: www
mountPath: /usr/share/nginx/html
volumeClaimTemplates:
- metadata:
name: www
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: azurefile
resources:
azurefile # 빈 문자열은 명시적으로 설정해야 하며 그렇지 않으면 기본 스토리지클래스가 설정됨
volumeName: foo-pv
resources:
requests:
storage: 1Gi |