π ksearch
Search your Kubernetes resources like you mean it.

Install with Krew β’ Download a release β’ See examples
β¨ Features
- π Search resources by name pattern
- π¦ Filter results by selected kinds
- π§ Scope to a namespace or search broadly
- π§ Discover supported resources dynamically from the cluster
- β‘ Reuse cached output with TTL control
- π Install via Krew, GitHub Releases, or source build
π Installation
Krew
After the plugin is accepted into the official kubernetes-sigs/krew-index:
kubectl krew install ksearch
GitHub Releases
Download the latest archive from:
https://github.com/arush-sal/ksearch/releases
Build from source
git clone https://github.com/arush-sal/ksearch.git
cd ksearch
make build
./ksearch --help
βοΈ Quick Start
kubectl ksearch
kubectl ksearch -n kube-system
kubectl ksearch -n kube-system -p nginx
π― Examples
Search within one namespace:
kubectl ksearch -n default
Find resources related to one workload:
kubectl ksearch -n prod -p nginx
Limit output to selected kinds:
kubectl ksearch -n prod -k deployment,service,configmap,secret
Skip cache for a fresh read:
kubectl ksearch --no-cache
π Flags
| Flag |
Description |
-n, --namespace |
Namespace to search |
-p, --pattern |
Match resource names by substring |
-k, --kinds |
Comma-separated kinds or resources to include |
--cache-ttl |
Cache TTL, defaults to 1m |
--no-cache |
Skip cached output |
Environment override:
export KSEARCH_CACHE_TTL=30s
π Notes
- Resource discovery depends on what the current cluster exposes.
- Cached output is stored locally and reused until the TTL expires.
- Use
--no-cache when you need a fully fresh read.
π€ Contributing
Contributor-facing documentation lives in CONTRIBUTION.md.