kind: Deployment
apiVersion: apps/v1
metadata:
  name: nginx-with-pv
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
        - name: webserver
          image: nginx
          ports:
            - containerPort: 80
          volumeMounts:
            - mountPath: /usr/share/nginx/html
              name: webservercontent
      volumes:
        - name: webservercontent
          persistentVolumeClaim:
            claimName: pvcrequest
