A better kubectl explain with the fuzzy finder
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 10 个月前 | ||
| 10 个月前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 |
以下内容由 AI 翻译,如有问题请 点此提交 issue 反馈
kubectl-explore

原版 kubectl-explain 存在哪些不足?
kubectl explain要求预先知道资源名称/字段。kubectl explain要求准确输入资源名称/字段的路径,这一过程繁琐且容易出错。
示例用法
# Fuzzy-find a resource, then a field to explain
kubectl explore
# Fuzzy-find from all fields of a specific resource.
kubectl explore pod
kubectl explore sts
# Fuzzy-find from fields that a given regex matches.
kubectl explore sts.*Account
安装
Krew
使用 krew 插件管理器进行安装。 请参阅 指南 来安装 krew。
kubectl krew install explore
kubectl explore --help
Nix
该插件可在 nixpkgs 中获取:
nix-env -iA nixpkgs.kubectl-explore
Arch
[yay/paru] -S kubectl-explore-bin
下载二进制文件
从 GitHub Releases 下载二进制文件,并将其放入您的 $PATH 中。
# Other available architectures are linux_arm64, darwin_amd64, darwin_arm64, windows_amd64.
export ARCH=linux_amd64
# Check the latest version, https://github.com/keisku/kubectl-explore/releases/latest
export VERSION=<LATEST_VERSION>
wget -O- "https://github.com/keisku/kubectl-explore/releases/download/${VERSION}/kubectl-explore_${VERSION}_${ARCH}.tar.gz" | sudo tar -xzf - -C /usr/local/bin && sudo chmod +x /usr/local/bin/kubectl-explore
从源代码获取。
go install github.com/keisku/kubectl-explore@latest
sudo mv $GOPATH/bin/kubectl-explore /usr/local/bin
验证 kubectl explore 是否可以执行。
Kubernetes 文档 中说明了如何使用插件。
kubectl explore --help