Docker Community Forums

Share and learn in the Docker community.

Unable to mount any volume deploying to Kubernetes for Docker for Mac


(Zerofinancial) #1

Managed to easily deploy my Kupernetes yaml files (great!). However when I try setting a mount inside my Users folder, Kubernetes says its forever pending. Relevant snippets:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: {{ .Values.global.servicePrefix }}-postgres-pvc
  labels:
    type: local
    app: {{ template "postgres.name" . }}
    release: {{ .Release.Name }}
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 4Gi
  volumeName: {{ .Values.global.servicePrefix }}-postgres-pv
apiVersion: v1
kind: PersistentVolume
metadata:
  name: {{ .Values.global.servicePrefix }}-postgres-pv
  labels:
    type: local
    app: {{ template "postgres.name" . }}
    release: {{ .Release.Name }}
spec:
  capacity:
    storage: 4Gi
  accessModes:
    - ReadWriteOnce
  volumeMode: Filesystem
  hostPath:
    path: /Users/me/postgresTest