Skip to content

Commit 3dd4f3c

Browse files
committed
update doc
1 parent 0e2bd56 commit 3dd4f3c

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

doc/USAGE.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,30 @@ The following assumes you have the plugin installed via
66
kubectl krew install pv-mounter
77
```
88

9-
### Scan images in your current kubecontext
9+
### Mount PVC to local directory
1010

1111
```shell
12-
kubectl pv-mounter
12+
kubectl pv-mounter mount some-ns some-pvc some-mountpoint
1313
```
1414

15-
### Scan images in another kubecontext
15+
### Unmount / clean stuff
1616

1717
```shell
18-
kubectl pv-mounter --context=context-name
18+
kubectl pv-mounter clean some-ns some-pvc some-mountpoint
1919
```
2020

2121
## 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.

0 commit comments

Comments
 (0)