Skip to content
プロジェクト

clbx/kubectl-browse-pvc

GitHubで見る

概要

Kubectl plugin for browsing PVCs on the command line

開発ツール

この数値の測り方

計測したスター増加

24時間
0
7日間
0
15日間
0
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

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

関連プロジェクトを探す

読み込み中…