File tree 1 file changed +18
-5
lines changed 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -6,17 +6,30 @@ The following assumes you have the plugin installed via
6
6
kubectl krew install pv-mounter
7
7
```
8
8
9
- ### Scan images in your current kubecontext
9
+ ### Mount PVC to local directory
10
10
11
11
``` shell
12
- kubectl pv-mounter
12
+ kubectl pv-mounter mount some-ns some-pvc some-mountpoint
13
13
```
14
14
15
- ### Scan images in another kubecontext
15
+ ### Unmount / clean stuff
16
16
17
17
``` shell
18
- kubectl pv-mounter --context=context-name
18
+ kubectl pv-mounter clean some-ns some-pvc some-mountpoint
19
19
```
20
20
21
21
## How it works
22
- Write a brief description of your plugin here.
22
+
23
+ It performs a few tasks. In the case of volumes with RWX (ReadWriteMany) access mode or unmounted RWO (ReadWriteOnce):
24
+
25
+ * Spawns a POD with a minimalistic image that contains an SSH daemon and binds it to the existing PVC.
26
+ * Creates a port-forward to make it locally accessible.
27
+ * Mounts the volume locally using SSHFS.
28
+
29
+ For already mounted RWO volumes, it's a bit more complex:
30
+
31
+ * Spawns a POD with a minimalistic image that contains an SSH daemon and acts as a proxy to an ephemeral container.
32
+ * Creates an ephemeral container within the POD that currently mounts the volume.
33
+ * From that ephemeral container, establishes a reverse SSH tunnel to the proxy POD.
34
+ * Creates a port-forward to the proxy POD onto the port exposed by the tunnel to make it locally accessible.
35
+ * Mounts the volume locally using SSHFS.
You can’t perform that action at this time.
0 commit comments