Operate Kubernetes clusters via kubectl with a user-supplied kubeconfig (local file path or remote URL). This skill should be used when users want to inspect...
Security
K8s Ops Fix
Try itKubernetes operations plugin — 32 tools for cluster management, monitoring, troubleshooting, and security auditing
What it does
Kubernetes operations plugin — 32 tools for cluster management, monitoring, troubleshooting, and security auditing
The skill document
k8s-ops
Kubernetes operations plugin for OpenClaw. Provides 32 tools covering the full lifecycle of K8s cluster management.
⚠️ 安全警告
重要:本插件具有强大的集群操作能力,使用前请仔细阅读以下安全建议:
-
凭据安全:kubeconfig 文件包含集群端点、用户身份、令牌和客户端证书等敏感信息。请勿在不安全的环境中存储或共享 kubeconfig 文件。
-
最小权限原则:建议使用最小权限的 kubeconfig,避免使用 cluster-admin 凭据。建议先在非生产环境中测试。
-
操作风险:exec、rollout、scale、restart、namespace 等操作可能对生产集群造成破坏性影响。请在执行前确认操作目标。
-
SSH 访问:配置中的
hosts字段用于 SSH 主机访问(sys-monitor 工具),请仅配置受信任的主机,避免在生产环境中使用密码认证。
Tools
- Pod Management: list, inspect, exec, logs, port-forward
- Deployments: status, rollout, scale, restart
- Services & Networking: services, ingress, gateway, network policies
- Workloads: jobs, cronjobs, daemonsets, statefulsets, HPA
- Storage: PV/PVC management
- Security: RBAC audit, security scanning, pod security policies
- Observability: events, metrics, health checks, cost analysis
- Troubleshooting: diagnostics, topology, event analysis
- Advanced: CRDs, Helm releases, PDB, YAML generation, namespace management
Requirements
kubectlinstalled and configured with cluster access- Valid kubeconfig (defaults to
~/.kube/config) - 建议:使用最小权限的 ServiceAccount,避免使用集群管理员凭据
Configuration
Optional plugin config:
| Field | Description | 安全建议 |
|---|---|---|
kubeconfigPath | Custom path to kubeconfig file | 确保文件权限为 600,仅当前用户可读 |
defaultContext | Default Kubernetes context to use | 建议使用非生产环境的 context |
hosts | SSH target hosts for sys-monitor tool | 仅配置受信任的主机,建议使用 SSH 密钥认证 |
最佳实践
- 环境隔离:建议为不同环境(开发、测试、生产)使用不同的 kubeconfig
- 审计日志:启用 Kubernetes 审计日志,记录所有操作
- 定期轮换:定期轮换 kubeconfig 中的凭据和令牌
- 权限审查:定期审查 RBAC 权限,移除不必要的权限
Related skills
Use this skill whenever the user needs to operate a Kubernetes cluster — list/inspect pods, deployments, statefulsets, daemonsets, replicasets, jobs, cronjobs, services, ingresses, endpoints, configmaps, secrets (names/keys only), PVCs/PVs/storageclasses, nodes, namespaces, and events; read pod logs; describe pods/nodes; pod/node top (metrics); read-only diagnostics / RCA (pod-health, workload-readiness); scale deployments/statefulsets; rollout status/history/undo/pause/resume and set image; delete pods/deployments/jobs; create/delete namespaces; and cordon/uncordon/drain nodes. Works with any kubeconfig-reachable cluster (standard Kubernetes, k3s, EKS, GKE, AKS). Always use this skill for "list k8s pods", "scale deployment", "kubernetes pod logs", "describe pod", "why is my pod crashing", "diagnose pods", "which deployments are unhealthy", "rollout undo", "set image", "top pods", "drain node", "cordon node", "restart deployment", "k3s", or "kubectl"-style tasks when the context is exp
Diagnoses Kubernetes workload failures and reviews manifests with a kubectl-first triage workflow grounded in local notes.
Kubernetes YAML清单生成工具,支持常用资源模板与基础校验。Use when 需要代码生成、编程辅助、调试测试、开发部署时使用。不适用于无明确技术栈的模糊需求。适用于独立开发者、企业团队和自动化工作流场景。支持中文交互,无需复杂配置即开即用。输出结果可直接使用,减少二次加工成本。提供结构化输出和错误处理机制。
Drive an Operately workspace from the command line — goals, projects, tasks, people, and documents via a single CLI.
Use when the user asks Codex to follow up, analyze, investigate, or is @mentioned for a project/system maintenance or operations issue. Guides Codex to clari...