k8s

GitHub

通过执行 kubectl 命令管理 Kubernetes 资源,支持自动使用存储的 kubeconfig、默认上下文/命名空间及 SSH 跳板机隧道功能。

internal/ai/skills/k8s/SKILL.md opskat/opskat

Trigger Scenarios

需要查看或操作 K8s 集群资源 执行 kubectl 相关运维指令

Install

npx skills add opskat/opskat --skill k8s -g -y
More Options

Non-standard path

npx skills add https://github.com/opskat/opskat/tree/main/internal/ai/skills/k8s -g -y

Use without installing

npx skills use opskat/opskat@k8s

指定 Agent (Claude Code)

npx skills add opskat/opskat --skill k8s -a claude-code -g -y

安装 repo 全部 skill

npx skills add opskat/opskat --all -g -y

预览 repo 内 skill

npx skills add opskat/opskat --list

SKILL.md

Frontmatter
{
    "name": "k8s",
    "description": "Run kubectl commands against a Kubernetes asset via exec. Covers command syntax and the stored kubeconfig \/ jump-host behavior."
}

Kubernetes assets

Command syntax

Pass the kubectl command as command, with or without the leading kubectl:

  • get pods -A
  • describe pod api-0 -n prod
  • logs deploy/api --tail 100
  • kubectl get nodes -o wide

Notes

  • The asset's stored kubeconfig is used automatically. Do not pass --kubeconfig.
  • The asset's default context and namespace are applied when the command does not specify them.
  • If the asset has an SSH jump host configured, kubectl runs on that host; otherwise it runs locally.
  • The scope parameter is not used by Kubernetes assets.

Asset config (for put_asset)

field type required notes
kubeconfig string yes Full kubeconfig YAML content; stored encrypted
namespace string no Default namespace; must not contain whitespace or start with -
context string no Kubeconfig context to use; same character restrictions as namespace
ssh_asset_id number no SSH asset to tunnel through; 0 detaches

Version History

  • aeb4bc3 Current 2026-07-24 16:28

Same Skill Collection

internal/ai/skills/database/SKILL.md
internal/ai/skills/etcd/SKILL.md
internal/ai/skills/kafka/SKILL.md
internal/ai/skills/local/SKILL.md
internal/ai/skills/mongodb/SKILL.md
internal/ai/skills/oss/SKILL.md
internal/ai/skills/rdp/SKILL.md
internal/ai/skills/redis/SKILL.md
internal/ai/skills/serial/SKILL.md
internal/ai/skills/ssh/SKILL.md
internal/ai/skills/vnc/SKILL.md
plugin/opsctl/skills/opsctl/SKILL.md

Metadata

Files
0
Version
d6c7a6e
Hash
8b04e68f
Indexed
2026-07-24 16:28

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-18 03:14
浙ICP备14020137号-1 $mapa de visitantes$