Alpha Preview·Documentation in progress
Keyboard Shortcuts
Navigation
JNext heading
KPrevious heading
GGScroll to top
ShiftGScroll to bottom
NNext page
PPrevious page
Page
?Open keyboard shortcuts
EscClose modal
Skip to content

kubectl-pvc-explorer

A kubectl plugin for browsing and managing PVC contents via the pvc-explorer operator.

Use your existing kubeconfig for authentication — no extra login or credentials required.

shell
kubectl pvc list
kubectl pvc ls my-pvc -n my-namespace /data/logs
kubectl pvc cp my-pvc:/remote/file.txt ./local-file.txt

Relationship to the Operator

The CLI plugin communicates with the PVC Explorer operator installed in your cluster:

kubectl pvc
CLI plugin
kubeconfig
pvc-explorer
Operator
proxies
pvc-explorer-agent
Agent pod

The plugin reads the bearer token from the *-agent-token Secret automatically, so there is no separate login step.

Installation

shell
git clone https://github.com/pvc-explorer-operator/kubectl-pvc-explorer.git
cd kubectl-pvc-explorer
make install

Verify:

shell
kubectl plugin list
kubectl pvc --version

Prerequisites

  • Go 1.26+
  • kubectl with a valid kubeconfig pointing to a cluster with PVC Explorer installed
  • macOS: macFUSE (only for the mount command)

Commands

CommandDescription
kubectl pvc cat <pvc> <path>Display file contents
kubectl pvc cp <src> <dest>Upload/download files (supports glob patterns)
kubectl pvc exec <pvc> -- <cmd>Execute commands inside the agent pod
kubectl pvc listList all PVCExplorer resources
kubectl pvc ls <pvc> [path]List files on a PVC
kubectl pvc mount <pvc> <dir>FUSE mount (experimental)
kubectl pvc sleep <pvc>Scale agent back to 0
kubectl pvc wake <pvc>Scale agent from 0 to 1 (--wait 2m to wait for readiness)

Quick Start

shell
# Wake the agent
kubectl pvc wake my-pvc -n my-namespace

# Browse files
kubectl pvc ls my-pvc -n my-namespace /data

# Download a file
kubectl pvc cp my-pvc:/data/config.yaml ./config.yaml

# Upload a file
kubectl pvc cp ./local-file.txt my-pvc:/remote/dir/

# Execute a command
kubectl pvc exec my-pvc -n my-namespace -- ls -la

# Sleep when done
kubectl pvc sleep my-pvc -n my-namespace

Local Development

The project includes a Kind-based local environment in the pvc-explorer repo:

shell
cd pvc-explorer
./kind/setup.sh
cd ../kubectl-pvc-explorer
make install
kubectl pvc list

Repository

Apache 2.0 licensed. Built with the Kubebuilder framework.