ksearch

command module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2026 License: Apache-2.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README ΒΆ

πŸ”Ž ksearch

Search your Kubernetes resources like you mean it.

CI Release Go Version License

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.

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL