{"id":20673714,"url":"https://github.com/cpg314/pv_inspect","last_synced_at":"2026-02-14T19:02:59.530Z","repository":{"id":239361569,"uuid":"799306344","full_name":"cpg314/pv_inspect","owner":"cpg314","description":"Mount a Kubernetes PersistentVolumeClaim volume on a new pod, shell into it, and mount it via SSHFS","archived":false,"fork":false,"pushed_at":"2025-02-26T22:13:11.000Z","size":45,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-02T00:41:19.547Z","etag":null,"topics":["data-volume","kubernetes","pvc","rust","samba-server"],"latest_commit_sha":null,"homepage":"https://c.pgdm.ch/code","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cpg314.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-11T18:25:13.000Z","updated_at":"2025-02-26T22:13:14.000Z","dependencies_parsed_at":"2025-02-09T23:24:13.236Z","dependency_job_id":"943d7c38-f3bb-4225-a8a2-6de5147687b8","html_url":"https://github.com/cpg314/pv_inspect","commit_stats":null,"previous_names":["cpg314/pv_inspect"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/cpg314/pv_inspect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpg314%2Fpv_inspect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpg314%2Fpv_inspect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpg314%2Fpv_inspect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpg314%2Fpv_inspect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cpg314","download_url":"https://codeload.github.com/cpg314/pv_inspect/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpg314%2Fpv_inspect/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29452592,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T15:52:44.973Z","status":"ssl_error","status_checked_at":"2026-02-14T15:52:11.208Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-volume","kubernetes","pvc","rust","samba-server"],"created_at":"2024-11-16T20:42:20.081Z","updated_at":"2026-02-14T19:02:59.513Z","avatar_url":"https://github.com/cpg314.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pv_inspect\n\nSmall utility to \"shell into\" a Kubernetes volume and mount it locally if desired.\n\nThis allows easily inspecting or accessing volumes, even when they are not already mounted.\n\nThis works by automatically:\n\n- Creating a new pod with the volume attached.\n- Opening a shell into the pod.\n- Optionally mounting the volume locally via SSHFS, after port forwarding on an OpenSSH server running on the pod.\n- Deleting the pod when the tool is exited.\n\n## Installation\n\nSee the packages on the [releases page](https://github.com/cpg314/pv_inspect/releases).\n\nAlternatively, compile with cargo:\n\n```console\n$ cargo install --git https://github.com/cpg314/pv_inspect\n```\n\n## Usage\n\n```\nMount a PVC on a new pod, shell into it, and mount it (via SSHFS) if desired\n\nUsage: pv_inspect [OPTIONS] [NAME]\n\nArguments:\n  [NAME]  Name of the PVC to inspect. If not provided, a list will be shown.\n\nOptions:\n  -n, --namespace \u003cNAMESPACE\u003e    [default: default]\n  -m, --mountpoint \u003cMOUNTPOINT\u003e\n      --rw                       Mount the volume in read/write mode rather than read only\n      --nowait                   Do not wait until the pod has been deleted\n      --cleanup                    Cleanup stale pv_inspect pods and exit\n      --cleanup-min \u003cCLEANUP_MIN\u003e  Age in minutes to cleanup pods [default: 240]\n  -h, --help                     Print help\n  -V, --version                  Print version\n```\n\nFor example:\n\n```console\n$ pv_inspect -n mynamespace --rw mypvc\n$ # Mount locally\n$ pv_inspect -n mynamespace --rw -m ~/mounts/volume mypvc\n```\n\n### As a `k9s` plugin\n\nIf you use the [k9s Kubernetes TUI](https://k9scli.io/), you can install `pv_inspect` as a plugin by editing your plugins configuration (see the output of `k9s info`) as follows:\n\n```yaml\nplugins:\n  pv_inspect:\n    shortCut: p\n    description: pv_inspect\n    scopes:\n      - pvc\n    command: pv_inspect\n    args:\n      - -n\n      - $NAMESPACE\n      - $NAME\n```\n\nWhen viewing `PersistentVolumeClaims`, the `p` key (or any other you might choose) will launch `pv_inspect`:\n\n![k9s screenshot](k9s.png)\n\n## Cleanup\n\nThe `--cleanup` command allows delete `pv_inspect` dangling pods, due to the client aborting before deletion. It can also be executed on the cluster as a cronjob, see [`cleanup_job.yaml`](cleanup_job.yaml).\n\n## TODO\n\n- `rsync`-style subcommand.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpg314%2Fpv_inspect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcpg314%2Fpv_inspect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpg314%2Fpv_inspect/lists"}