MCPcopy Index your code
hub / github.com/d-kuro/kubectl-fuzzy

github.com/d-kuro/kubectl-fuzzy @v1.9.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.9.0 ↗ · + Follow
73 symbols 231 edges 12 files 58 documented · 79% updated 5mo agov1.9.0 · 2021-04-24★ 1673 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

kubectl-fuzzy

Fuzzy and partial string search for kubectl

Summary

This tool uses fzf(1)-like fuzzy-finder to do partial or fuzzy search of Kubernetes resources. Instead of specifying full resource names to kubectl commands, you can choose them from an interactive list that you can filter by typing a few characters.

📝 Notes

kubectl >= v1.12.0 is required for plugins to work.

For more information on kuberctl plugins see documentation

Install

Krew

Krew is the plugin manager for kubectl command-line tool.

📝 See the documentation for how to install Krew.

kubectl krew update
kubectl krew install fuzzy

Manually

Please download the binaries from the release page.

or

git clone https://github.com/d-kuro/kubectl-fuzzy.git
cd kubectl-fuzzy
make install

Usage

$ kubectl fuzzy -h
Fuzzy Finder kubectl

Usage:
  kubectl-fuzzy
  kubectl-fuzzy [command]

Available Commands:
  create      Create a resource
  delete      Selecting an object with the fuzzy finder and delete
  describe    Selecting an object with the fuzzy finder and show details
  exec        Selecting a Pod with the fuzzy finder and execute a command in a container
  help        Help about any command
  logs        Selecting a Pod with the fuzzy finder and view the log
  version     Show version

Use "kubectl-fuzzy [command] --help" for more information about a command.

Support Commands

  • [x] kubectl logs
  • [x] kubectl exec
  • [x] kubectl describe
  • [x] kubectl create job --from=cronjob
  • [x] kubectl delete
  • anything else...

📝 See the documentation for support commands.

Preview Mode

You can use the --preview or -P option to display a YAML of the Kubernetes object in a fuzzy finder selector. Or you can use environment variables. KUBE_FUZZY_PREVIEW_ENABLED=true You can switch the display to YAML or JSON with the --preview-format option.

e.g.

kubectl fuzzy describe deployment --preview
or
kubectl fuzzy describe deployment -P

The Kubernetes object displayed in the preview window is simplified by default. Some metadata and statuses have been removed. Use the --raw-preview option to display the unsimplified object.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 34
Function 28
Struct 10
FuncType 1

Languages

Go100%

Modules by API surface

pkg/cmd/logs.go11 symbols
pkg/cmd/exec.go10 symbols
pkg/fuzzyfinder/fuzzyfinder.go9 symbols
pkg/cmd/delete.go9 symbols
pkg/cmd/create_job.go8 symbols
pkg/cmd/describe.go7 symbols
pkg/cmd/create.go7 symbols
pkg/printers/simplify.go5 symbols
pkg/cmd/root.go3 symbols
cmd/kubectl-fuzzy/main.go2 symbols
pkg/kubernetes/kubernetes.go1 symbols
pkg/cmd/version.go1 symbols

For agents

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

⬇ download graph artifact

Ask about this repo answers extend the page