pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/guessi/kubectl-grep

GitHub - guessi/kubectl-grep: Filter Kubernetes resources by matching their names · GitHub
Skip to content

guessi/kubectl-grep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

374 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubectl Grep

GitHub Actions GoDoc Go Report Card GitHub release GitHub go.mod Go version

Filter Kubernetes resources by matching their names

🤔 Why we need this? what it is trying to resolve?

Playing with Kubernetes in our daily job, we normally search pods by pipe, grep, --label, --field-selector, etc. while hunting abnormal pods, but typing such long commands is quite annoying. With plugin installed, it could be easily be done by kubectl grep.

🔢 Prerequisites

  • An existing Kubernetes cluster.
  • Have kubectl installed.
  • Have krew installed.

🚀 Quick start

# Have krew plugin installed
kubectl krew install grep
# Before change, we usually filter pods by the following commands,
kubectl get pods -n star-lab | grep "flash"
# With this plugin installed, you can filter pod easily
kubectl grep pods -n star-lab flash

:accessibility: FAQ

How do I check the version installed?

  • kubectl grep version

How do I know the version installed is compatible with my cluster version?

What kind of resource(s) kubectl-grep support?

👷 Install

Recommended way

Brand new install

kubectl krew update && kubectl krew install grep

To upgrade version

kubectl krew update && kubectl krew upgrade grep

Manual Installation

Click to expand!
curl -fsSL -O https://github.com/guessi/kubectl-grep/releases/latest/download/kubectl-grep-$(uname -s)-$(uname -m).tar.gz
tar zxvf kubectl-grep-$(uname -s)-$(uname -m).tar.gz
mv kubectl-grep /usr/local/bin

Developer build

Click to expand!
go get -u github.com/guessi/kubectl-grep
cd ${GOPATH}/src/github.com/guessi/kubectl-grep
make all

⚖️ License

Apache-2.0

About

Filter Kubernetes resources by matching their names

Topics

Resources

License

Stars

Watchers

Forks

Contributors

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy