You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the missing *Mount During Start* section to describe how to mount a
directory when starting a cluster. This section describes the new
virtiofs mounts introduced in minikube 1.37.0.
Rename the *9p Mounts* section to *Mount Command* to make it more clear.
This is an alternative for the *Mount During Start* if the user need to
mount more than one directory or mount or unmount directories after the
cluster was started. Remove the Kubernetes manifest example as it is not
specific to mount command.
Rename the *Driver Mount* section to *Driver Automatic Mounts* to make
it more clear, and remove drivers that do not support this feature.
Add *Driver Specific Mounts* for special mount options supported by
specific drivers, currently only HyperKit.
Reformat text tables to make the source easier to work with.
Issues:
- Missing `--mount-string` support on Windows and other drivers I'm not
sure what works and/or tested and we have too many drivers[1]
- Add section for using mounts in Kubernetes manifests?
[1] https://minikube.sigs.k8s.io/docs/drivers/
Copy file name to clipboardExpand all lines: site/content/en/docs/handbook/mount.md
+64-55Lines changed: 64 additions & 55 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,79 +8,88 @@ aliases:
8
8
- /docs/tasks/mount
9
9
---
10
10
11
-
## 9P Mounts
11
+
## Mount During Start
12
12
13
-
9P mounts are flexible and work across all hypervisors, but suffers from performance and reliability issues when used with large folders (>600 files). See **Driver Mounts** as an alternative.
13
+
To mount a directory from the host into the guest using the `start` subcommand
14
+
use the `--mount-string` flag:
14
15
15
-
To mount a directory from the host into the guest using the `mount` subcommand:
The `--mount-string` flag supports only a single mount. If you want to mount
41
+
additional directories, or mount and unmount directories after the cluster was
42
+
started see [Mount Command](#Mount-command).
43
+
44
+
## Mount Command
45
+
46
+
The mount command allows mounting and unmounting directories after the minikube
47
+
cluster was started using the *9p* filesystem. The command works with all VM
48
+
drivers.
49
+
50
+
To mount a directory from the host into the guest using the `mount` subcommand:
22
51
23
52
```shell
24
-
minikube mount $HOME:/host
53
+
minikube mount <host directory>:<guest> directory>
25
54
```
26
55
27
-
This directory may then be referenced from a Kubernetes manifest, for example:
56
+
For example, this would mount your `~/models` directory to appear as
57
+
`/mnt/models` within the minikube VM:
28
58
29
59
```shell
30
-
{
31
-
"apiVersion": "v1",
32
-
"kind": "Pod",
33
-
"metadata": {
34
-
"name": "ubuntu"
35
-
},
36
-
"spec": {
37
-
"containers": [
38
-
{
39
-
"name": "ubuntu",
40
-
"image": "ubuntu:18.04",
41
-
"args": ["bash"],
42
-
"stdin": true,
43
-
"stdinOnce": true,
44
-
"tty": true,
45
-
"workingDir": "/host",
46
-
"volumeMounts": [
47
-
{
48
-
"mountPath": "/host",
49
-
"name": "host-mount"
50
-
}
51
-
]
52
-
}
53
-
],
54
-
"volumes": [
55
-
{
56
-
"name": "host-mount",
57
-
"hostPath": {
58
-
"path": "/host"
59
-
}
60
-
}
61
-
]
62
-
}
63
-
}
60
+
minikube mount ~/models:/mnt/models
64
61
```
65
62
66
-
## Driver mounts
63
+
The directory remains mounted while the mount command is running. To unmount the
64
+
directory terminate the mount command with `Control+C`.
65
+
66
+
*9p* mounts are flexible and work across all hypervisors, but suffers from
67
+
performance and reliability issues when used with large folders (>600 files).
68
+
See [Driver Automatic Mounts](#driver-automatic-mounts) and
69
+
[Driver Specific Mounts](#driver-specific-mounts) as alternatives.
70
+
71
+
## Driver automatic mounts
72
+
73
+
Some hypervisors, have built-in host folder sharing. Driver mounts are reliable
74
+
with good performance, but the paths may differ across operating systems or
75
+
hypervisors:
67
76
68
-
Some hypervisors, have built-in host folder sharing. Driver mounts are reliable with good performance, but the paths are not predictable across operating systems or hypervisors:
0 commit comments