HostPath volumes on Mac
See original GitHub issueConsider a pod like the following:
metadata:
name: foo
spec:
containers:
image: alpine
name: bar
volumeMounts:
- mountPath: /data
name: baz
volumes:
- hostPath:
path: /Users/user/data
name: baz
I’d expect this to mount /Users/user/data
folder from my host to the container, but apparently what is getting mounted is a folder from the underlying lima VM. My understanding that there is no osxfs/Fuse driver alternative for Desktop in Rancher Desktop? Is there any plans for it? Lima seems to be capable to be translating my local paths to the default VM just fine - maybe it’s a matter of missing configuration?
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
What's the base directory for hostPath volumes in Docker for ...
It seems there is no such thing as a base directory for hostPath volumes at the macOS level. Docker on Desktop works by...
Read more >Persistent storage using hostPath - OpenShift Documentation
A hostPath volume in an OpenShift Container Platform cluster mounts a file or directory from the host node's filesystem into your pod.
Read more >How to mount hostPath using docker-for-mac + kubernetes
Have a look at File Sharing under Preferences. There you can see the shared folders. Example for volume, assuming /tmp is in the...
Read more >[k8s] How to mount local directory (persistent volume) to ...
I tried to mount hostPath (the default StorageClass created by Docker Desktop) like below: Check and add the directories you want to share...
Read more >Persistent Volume for Kubernetes w/ ACL Support on Mac
Then, I moved to a volume mounted directly via hostPath, which, ... Docker Desktop for Mac installed; Kubernetes cluster enabled.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve verified that this is indeed broken in RD 0.4.1, but it does work in the latest development builds that will become RD 0.5.0 within the next couple of days.
I strongly suspect that this is due to RD 0.4.1 bundling an older version of Lima, and I think the issue was fixed by https://github.com/lima-vm/lima/pull/247 which was merged into Lima just 11 days ago.
Indeed. I forgot that RD 0.4.1 doesn’t map the usual directories. In 0.5.0 the mounts will be like this: