Giter Club home page Giter Club logo

kubectl-fuzzy's Introduction

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

  • kubectl logs
  • kubectl exec
  • kubectl describe
  • kubectl create job --from=cronjob
  • 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.