SuperAPI AI 工具集

olares-cluster

通用与其它

查看项目

更新于 10-15 17:25

技能介绍

用途:olares-cluster 提供 Olares ControlHub 中按用户划分的 Kubernetes 运行时视图,用于查看和变更 K8s 对象。使用前需加载 ../olares-shared/SKILL.md 了解套件路由、活动 profile 选择、平台入口与认证门禁;涉及登录、切换 profile、令牌存储或认证恢复时再加载其认证参考。语法可用 olares-cli cluster <noun> <verb> --help 查询。

主要能力:按名词分组,context 显示当前 profile 的身份与可见范围;pod 支持 list、get、yaml、events、logs、delete、restart、exec;container 支持 list、env、logs、exec;workload(wl)支持 list、images、get、yaml、rollout-status、scale、restart、stop、start、delete;application(app)支持 list、get、workloads、pods、status;namespace(ns)支持 list、get;node 支持 list、get;job 支持 list、get、yaml、pods、events、rerun;cronjob(cj)支持 list、get、yaml、jobs、suspend、resume;middleware(mw)支持 list。exec 需 Olares 1.12.7+。

使用方式:例如查看应用 Pod 状态用 olares-cli cluster pod list -n <namespace> -o json 并读取各 .status.phase;查看容器日志用 olares-cli cluster pod logs <pod> -n <namespace>;查看可见范围用 olares-cli cluster context -o json;重启工作负载用 olares-cli cluster workload restart <name> -n <namespace>。

限制与注意:身份即活动 profile,无单次调用级覆盖;可见性与授权由服务端决定,403 视为权威结果。watch 与日志跟随为轮询而非流式 API watch,瞬时网络或 5xx 会在有限次数内重试,4xx 立即停止,408 与 429 可重试,Ctrl-C 仅停止本地轮询。所有破坏性变更需先确认;exec 属远程代码执行边界,需确认命名空间、Pod、容器、命令及是否写入,优先一次性执行。workload stop/start 只改控制器副本,不更新 Market 生命周期,应用级生命周期应使用 market stop/resume。诊断应用故障应使用 ../olares-doctor/SKILL.md。404 可能表示 profile 不可见该命名空间,不应擅自扩大范围或切换身份。完整镜像引用诊断应使用 doctor images。命名空间或资源身份不明确、缺少权限或涉及访问他人容器时应停止。