apiVersion: apps/v1 #  for k8s versions before 1.9.0 use apps/v1beta2  and before 1.8.0 use extensions/v1beta1
kind: Deployment
metadata:
  name: deployment
spec:
  selector:
    matchLabels:
      app: redis
  replicas: 1
  template:
    metadata:
      labels:
        app: redis
    spec:
      containers:
      - name: redis
        image: redis
        volumeMounts:
        - name: vmfs-vmdk-storage
          mountPath: /data/
      volumes:
      - name: vmfs-vmdk-storage
        vsphereVolume:
          volumePath: "[Datastore] volumes/testdir"
          fsType: ext4