If you installed via krew do
kubectl get-all--only-scope=clusterwill only show cluster level resources, such asClusterRole,Namespace, orPersistentVolume.--only-scope=namespacewill only show namespaced resources, such asServiceAccount,Role,ConfigMap, orEndpoint.--selector(-l) will filter by label query, supports=,==, and!=.(e.g.-l key1=value1,key2=value2)--excludewill filter out the given resources. Accepts either resource names (e.g.componentstatusesor short formcs) or API Kinds (e.g.ComponentStatus). Defaults to[Event, PodMetrics]because those are rarely useful.- ...and many standard
kubectloptions. Have a look atkubectl get-all --helpfor a full list of supported flags. --use-cachewill consider the http cache to determine the server resources to look at. Disabled by default.--allow-incompletewill show partial results when fetching the list of API resources fails. Enabled by default.-vset the log level (one of debug, info, warn, error, fatal, panic).
Hint: If you do not have access to all resources, bulk fetching needs to be disabled. You can speed things up by explicitly excluding all resources which you may not access.
Get all resources...
-
... excluding events (this is hardly ever useful)
kubectl get-all
-
... including events
kubectl get-all --exclude=
-
... created in the last minute
kubectl get-all --since 1m
This flag understands typical human-readable durations such as
1mor1y1d1h1m1s. -
... in the default namespace
kubectl get-all --namespace=default
-
... at cluster level
kubectl get-all --only-scope=cluster
-
... using list of cached server resources
kubectl get-all --use-cache
Note that this may fail to show really everything, if the http cache is stale.
-
... and combine with common
kubectloptionsKUBECONFIG=otherconfig kubectl get-all -o name --context some --namespace kube-system --selector run=skaffold
kubectl get-all helpNote that in the help, the tool is referred to as ketall, which is the standard name when installed as stand-alone tool.
Completion does currently not work when used as a kubectl plugin. When used stand-alone, you can do
source <(ketall completion bash) # for bash users
source <(ketall completion zsh) # for zsh usersAlso see ketall completion --help for further instructions.
The command will look for the configuration file ketall (no extension) in . or $HOME/.kube/, unless overridden by the --config option.
The following settings can be configured:
only-scope: cluster
namespace: default
use-cache: true
since: 1m
selector: run=skaffold,tail!=true
# only plural form or abbreviations
exclude:
- componentstatuses
- cm # configmapsIf you do not have krew installed, visit https://github.com/kubernetes-sigs/krew.
kubectl krew install get-allMost users will have installed ketall via krew,
so the plugin is already correctly installed.
Otherwise, rename ketall to kubectl-get_all and put it in some directory from your $PATH variable.
Then you can invoke the plugin via kubectl get-all
Put the ketall binary in some directory from your $PATH variable. For example
sudo mv -i ketall /usr/bin/ketallThen you can invoke the plugin via ketall
