apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
  name: volumes-deployment
  namespace:  demo-volumes
  labels:
    app: volumes
    target: demo
spec:
  selector:
    matchLabels:
      app: volumes
      target: demo
  replicas: 1 
  template:
    metadata:
      labels:
        app: volumes
        target: demo
    spec:
      containers:
      - name: webapp
        image: eu.gcr.io/<project-id>/file-node-site:v1
        ports:
        - containerPort: 8080
        volumeMounts:
        - mountPath: /usr/src/app/output
          name: caption-folder  
        resources:
          limits:
            memory: "200Mi"
            cpu: "300m"
          requests:
            memory: "100Mi"
            cpu: "100m"
      volumes:
        - name: caption-folder
          gcePersistentDisk:
            pdName: demo-volume # NOTE: disk must exists before running this
            fsType: ext4
