0

I have created a pv and pvc and they were bounded .I need to create a pod with pvc and they given me a storage volume with label and a mount path to mount volume. But they have not given me image of pod how can i create?

Devi
  • 1
  • 1

1 Answers1

0

So if you want to create a pod, then probably is to run some containers, correct?

This would be an example yaml for what you need:

apiVersion: v1
kind: Pod
metadata:
  name: my-pod-name
spec:
  containers:
    - name: my-container-name
      image: github.com/container-image
      volumeMounts:
        - mountPath: ${PATH_FOR_PVC_MOUNT}
          name: my-pvc
  (...)
  volumes:
      - name: my-pvc
        persistentVolumeClaim:
          claimName: my-pvc-claim-name
          readOnly: false