173787247/dsh-wsl-k8s ↗★ 1

dsh-wsl-k8s

只读查看Kubernetes资源与日志 用于安全地获取K8s集群状态和Pod日志,支持限制允许的Context。

包名
dsh-wsl-k8s
兼容性
待验证
版本
0.1.0
许可证
MIT
最近更新
2026年9月22日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:173787247/dsh-wsl-k8s

kubectl 已配置好 kubeconfig

dsh plugin --profile web add github:173787247/dsh-wsl-k8s


## 工具

| 工具 | 作用 |
|------|------|
| `k8s_status` | kubectl 是否可用、当前 context |
| `k8s_get` | `kubectl get`(输出有长度上限) |
| `k8s_describe` | `kubectl describe` |
| `k8s_logs` | Pod 日志(截断) |

## 配置

```yaml
config:
  enabled: true
  timeoutMs: 30000
  maxOutputChars: 40000
  # 非空时只允许这些 context;空 = 不限制(仍只读)
  allowedContexts: []
  # 例: allowedContexts: [dev, staging]

生产集群建议显式写 allowedContexts,并保证 kubeconfig 本身权限最小。

License

MIT

配置

config:
  enabled: true
  timeoutMs: 30000
  maxOutputChars: 40000
  # 非空时只允许这些 context;空 = 不限制(仍只读)
  allowedContexts: []
  # 例: allowedContexts: [dev, staging]

生产集群建议显式写 allowedContexts,并保证 kubeconfig 本身权限最小。