apiVersion: v1
kind: Pod
metadata:
  name: redis-pvc
  labels:
    app: redis-pvc
spec:
  containers:
  - name: redis-pod
    image: redis:alpine
    imagePullPolicy: IfNotPresent
    # command: # 不需要
    volumeMounts:
    - mountPath: /data  # 这是redis的存储目录
      name: pvc-volume
  volumes:
  - name: pvc-volume
    persistentVolumeClaim:
      claimName: nfs-pvc2 # 请求的PVC，必须存在
