guessi / kubectl-grep Goto Github PK
View Code? Open in Web Editor NEWFilter Kubernetes resources by matching their names
License: Apache License 2.0
Filter Kubernetes resources by matching their names
License: Apache License 2.0
Describe the bug
Unless there is a kubeconfig with configuration for a valid cluster set as the current context, all kubectl-grep commands fail.
Source of the problem
InitClient() code
To Reproduce
kubectl grep
Expected behavior
kubectl grep --help
will show help info
kubectl grep --version
will show the version
kubectl grep pods "debug"
will fail
Screenshots
sh-4.2# kubectl grep --help
Fatal: Unable to get config
sh-4.2# kubectl grep --version
Fatal: Unable to get config
sh-4.2# kubectl grep pods "debug"
Fatal: Unable to get config
sh-4.2# kubectl config view
apiVersion: v1
clusters: []
contexts: []
current-context: ""
kind: Config
preferences: {}
users: []
sh-4.2# kubectl-grep --version
Fatal: Unable to get config
sh-4.2# kubectl-grep --help
Fatal: Unable to get config
sh-4.2#
Environment (please complete the following information):
Additional context
Its very disruptive for automated utilities that login to a cluster must be done to verify the version installed.
👋 Hello, maintainer of the kubectl plugin manager krew here.
Thank you for your commitment to open source by making this plugin available via krew
!
Krew wants to give credit where credit is due by installing the proper license file for the plugins it distributes. However, your plugin was found to not contain any license file. We wanted to remind you that if you're using a license such as Apache 2.0, you should be bundling your LICENSE file with your plugin’s distributions.
What do you have to do?
files:
section to copy the file to the installation directory. Have a look at this PR for an example: https://github.com/kubernetes-sigs/krew-index/pull/314/filesIf you need further assistance, don't hesitate to ask for help.
Is your feature request related to a problem? Please describe.
Currently the CI only support master build, but it should support pull-requests as well.
Describe the solution you'd like
N/A
Describe alternatives you've considered
N/A
Additional context
N/A
Describe the bug
CircleCI build processes showing
No cache is found for key: v1-kubectl-search-cWF9gow_fbDB7st0znwgVDi3lvxE324Hq7w5e+Tkvrw=-source
which means the cache setup is not working
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
Kubernetes are kind of rapid development application, things may changed from day to day.
To avoid unexpected APIs compatibility issue, it would be better to pin the following packages on released version, or a tagged version, such as kubernetes-1.13.4
, or v10.0.0
. We should avoid go.mod
or go.sum
being updated after a go get -u ...
command executed, or it will be upgrade to master
commit, which might be an unstable build.
k8s.io/api
k8s.io/apimachinery
k8s.io/client-go
Describe the solution you'd like
N/A
Describe alternatives you've considered
N/A
Additional context
N/A
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
svarkey@svarkey-Precision-7760:~$ kubectl grep pods -l name=test --context cs-prod1
Error: unknown flag: --context
Usage:
kubectl-grep pods [flags]
Aliases:
pods, po, pod
Flags:
-h, --help help for pods
-o, --output string Output format.
Global Flags:
-A, --all-namespaces If present, list the requested object(s) across all namespaces.
--field-selector string Selector (field query) to filter on. (e.g. --field-selector key1=value1,key2=value2)
-n, --namespace string Namespace for search. (default: "default")
-l, --selector string Selector (label query) to filter on. (e.g. -l key1=value1,key2=value2)
unknown flag: --context
It would be incredibly beneficial to grep logs.
I'm currently having to get logs based on pod labels. Would be really nice if I could see all of the logs based on a grep command.
kubectl grep logs -n namespace service-a
Describe the bug
Need to specify namespace to have results on macosx
To Reproduce
Steps to reproduce the behavior:
kubectl grep pods nginx
kubectl grep pods nginx -n demo
Expected behavior
I would have thought that it would use the current NS
Screenshots
Environment (please complete the following information):
Additional context
NA
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
Cannot use in arm64 based cpu for macOS. Any plan on support it?
Thanks.
$ krew install grep
Updated the local copy of plugin index.
Installing plugin: grep
W0905 09:22:33.335262 47104 install.go:164] failed to install plugin "grep": plugin "grep" does not offer installation for this platform
failed to install some plugins: [grep]: plugin "grep" does not offer installation for this platform
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
Kubectl commands like get
work with CRDs, i.e. I can do things like kubectl get ingress
. But using kubectl grep
I can only get the basic/default resource types.
Describe the solution you'd like
Support the CRDs installed on the cluster like kubectl get
does, e.g. kubectl grep ingress
, kubectl grep mapping
, etc.
Describe alternatives you've considered
Only way is to go back to kubectl get ... | grep ...
Describe the bug
flag -h
or --help
is not working
instead, it returns,
% kubectl-grep -h
Usage of kubectl-grep:
-kubeconfig string
(optional) absolute path to the kubeconfig file (default "~/.kube/config")
To Reproduce
Steps to reproduce the behavior:
kubectl-grep -h
or kubectl-grep --help
Expected behavior
It should return default help message, just like kubectl-grep
does
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
ALL
Additional context
Add any other context about the problem here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.