• Stars
    star
    108
  • Rank 321,259 (Top 7 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created almost 6 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Filter Kubernetes resources by matching their names

Kubectl Grep

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

Filter Kubernetes resources by matching their names

Compatibility

please refer to Kubernetes version policy and CHANGELOG for supported version matrix.

Why we need it?

playing with Kubernetes is my daily job, and I normally search pods by pipe, grep, --label, --field-selector, etc. while hunting abnormal pods, but typing such long commands is quite annoying.

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 with kubectl grep easily

$ kubectl grep pods -n star-lab flash

Installation

Installation via krew

$ kubectl krew version # make sure you are running 0.4.3+
$ kubectl krew install grep
$ kubectl krew update
$ kubectl krew upgrade grep

Manual Installation

$ 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

How to get developer build?

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

FAQ

How do I check the tool's version?

  • kubectl grep version

Can I use version X kubectl with version Y kubectl-grep?

  • Sure, no problem

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

Reference

License

Apache-2.0

More Repositories

1

docker-compose-grafana-influxdb

Demo purpose scripts for running Grafana with InfluxDB as datasource.
Shell
89
star
2

docker-compose-etcd

demo: etcd destributed key-value store
37
star
3

cloudtrail-cli

Blazing fast single purpose cli for CloudTrail log filtering
Go
22
star
4

kubernetes-dnsperf

DNS Performance Testing with Kubernetes Pods
Shell
18
star
5

yourls-mobile-detect

Mobile-Detect plugin for YOURLS
PHP
17
star
6

docker-yourls

Dockerize YOURLS service (Shorten URL Service)
PHP
17
star
7

docker-tutorial-nodejs

Step-by-step tutorial for bringing traditional app into Docker world
JavaScript
11
star
8

eks-tutorials

Step by step tutorial for who have no experience to Amazon EKS. After finished the tutorial, you should be able to run general workload with Amazon EKS. Hope you enjoy the journey.
10
star
9

aws-cost-explorer-report

AWS Cost Explorer Pretty Report written in Python
Python
6
star
10

yourls-dont-log-health-checker

Plugin for YOURLS - Don't Log Health Checker
PHP
5
star
11

ssl-certs-checker

SSL certificate checker written in golang
Go
4
star
12

docker-nagios4

Dockerized Nagios Service
Dockerfile
4
star
13

easttownbbs

國立東華大學-東方小城-電子佈告欄系統(NDHU EastTown BBS)
C
4
star
14

youtube-search-crawler

YouTube Search Results Crawler
Python
3
star
15

eks-ami-finder

retrieve Amazon EKS AMI with filters
Go
3
star
16

node-shorten-url

a simple shorten url redirection solution with nodejs
JavaScript
2
star
17

sysprep

My personal bootstrap scripts
Shell
2
star
18

terraform-eks-minimal

Minimal setup for creating EKS cluster
HCL
2
star
19

drone-server-images

Minimized Docker Image for DroneCI Server
Dockerfile
2
star
20

go-shorten-url

a simple shorten url redirection solution with golang
Go
2
star
21

mysql-connectivity

MySQL Connectivity Check Utility
Go
1
star
22

nginx-proxy-golang

minimal setup for golang web app with nginx proxy (for demo only)
Go
1
star
23

wretchGrabber

a simple album grabber for the well-known album service provider in Taiwan, wretch.cc.
Python
1
star
24

ssl-certs-checker-py

SSL certificate checker written in python
Python
1
star
25

cloudformation-playground

Just a random CloudFormation templates
1
star
26

github-scanner

scanning public repositories on GitHub
Python
1
star
27

terraform-aws-route53

Extendable Terraform module that helps you manage Hosted Zones and Records easily.
HCL
1
star
28

ingress-nginx-controller-security-best-practices

Ingress-NGINX Controller for Kubernetes with Security Best Practices
1
star
29

eks-integrations-quick-start

Quick start scripts for common Amazon EKS integrations
Shell
1
star