MCPcopy Index your code
hub / github.com/clbx/kubectl-browse-pvc

github.com/clbx/kubectl-browse-pvc @v1.4.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.4.4 ↗ · + Follow
21 symbols 61 edges 7 files 4 documented · 19%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

kubectl-browse-pvc

Kubectl plugin to browse a Kubernetes PVC from the command line

I constantly found myself spinning up dummy pods to exec into them so I could browse a PVC, this takes a few steps out of creating dummy pods to check out the contents of a PVC.

Installation

Install via krew

kubectl krew install browse-pvc

Usage

kubectl browse-pvc <pvc-name>

On a PVC. The tool spins up a pod that mounts the PVC and then execs into it allowing you to modify the contents of the PVC. The Job finishes and cleans up the pod when you disconnect.

Commands can be described to run a command instead of popping a shell

kubectl browse-pvc <pvc-name> -- <command>

A User ID can be described to set the user the container runs as

kubectl browse-pvc -u 1000 <pvc-name>

Configuring auto-completion

cat > kubectl_browse-pvc <<EOF
#!/usr/bin/env sh

# Call the __complete command passing it all arguments
kubectl browse-pvc __complete "\$@"
EOF

chmod +x kubectl_browse-pvc

# Important: the following command may require superuser permission
sudo mv kubectl_browse-pvc /usr/local/bin

Dev

Test

All Tests

go test -v ./...

Specific Modules

go test -v github.com/clbx/kubectl-browse-pvc/<MODULE>

Example: go test -v github.com/clbx/kubectl-browse-pvc/internal/utils

Build

go build -v -o kubectl-browse-pvc cmd/browse-pvc/main.go

Core symbols most depended-on inside this repo

GetNodeTaints
called by 3
internal/utils/taints_and_tolerations.go
BuildTolerationsForTaints
called by 2
internal/utils/taints_and_tolerations.go
FindPodByPVC
called by 2
internal/utils/util.go
Stop
called by 2
internal/monitor/monitor_size.go
deleteJob
called by 2
cmd/browse-pvc/main.go
BuildPvcbGetJob
called by 1
internal/utils/util.go
MonitorSize
called by 1
internal/monitor/monitor_size.go
browseCommand
called by 1
cmd/browse-pvc/main.go

Shape

Function 12
Method 6
Struct 3

Languages

Go100%

Modules by API surface

cmd/browse-pvc/main.go5 symbols
internal/monitor/monitor_size_windows.go4 symbols
internal/monitor/monitor_size.go4 symbols
internal/utils/util.go3 symbols
internal/utils/taints_and_tolerations_test.go2 symbols
internal/utils/taints_and_tolerations.go2 symbols
internal/utils/util_test.go1 symbols

For agents

$ claude mcp add kubectl-browse-pvc \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page