Manage multiple Kubernetes clusters, switch contexts, and perform cross-cluster operations. Use when working with multiple clusters, comparing environments, or managing cluster lifecycle.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install k8-multicluster或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install k8-multicluster⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/k8-multicluster/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: k8s-multicluster description: Manage multiple Kubernetes clusters, switch contexts, and perform cross-cluster operations. Use when working with multiple clusters, comparing environments, or managing cluster lifecycle. ---
Cross-cluster operations and context management using kubectl-mcp-server's multi-cluster support.
list_contexts_tool()
kubeconfig_view() # Shows sanitized kubeconfig
CLI: kubectl-mcp-server context
All kubectl-mcp-server tools support the context parameter:
# Get pods from production cluster
get_pods(namespace="default", context="production-cluster")
# Get pods from staging cluster
get_pods(namespace="default", context="staging-cluster")
# Compare deployment across clusters
compare_namespaces(
namespace1="production",
namespace2="staging",
resource_type="deployment",
context="production-cluster"
)
Query multiple clusters simultaneously:
# Production cluster
get_pods(namespace="app", context="prod-us-east")
get_pods(namespace="app", context="prod-eu-west")
# Development cluster
get_pods(namespace="app", context="development")
# Check all clusters
for context in ["prod-1", "prod-2", "staging"]:
get_nodes(context=context)
get_pods(namespace="kube-system", context=context)
For managing cluster lifecycle:
capi_clusters_list_tool(namespace="capi-system")
capi_cluster_get_tool(name="prod-cluster", namespace="capi-system")
capi_cluster_kubeconfig_tool(name="prod-cluster", namespace="capi-system")
capi_machines_list_tool(namespace="capi-system")
capi_machinedeployments_list_tool(namespace="capi-system")
capi_machinedeployment_scale_tool(
name="prod-cluster-md-0",
namespace="capi-system",
replicas=5
)
See CONTEXT-SWITCHING.md for detailed patterns.
Deploy charts to specific clusters:
install_helm_chart(
name="nginx",
chart="bitnami/nginx",
namespace="web",
context="production-cluster"
)
list_helm_releases(
namespace="web",
context="staging-cluster"
)
flux_kustomizations_list_tool(
namespace="flux-system",
context="cluster-1"
)
flux_reconcile_tool(
kind="kustomization",
name="apps",
namespace="flux-system",
context="cluster-2"
)
argocd_apps_list_tool(namespace="argocd", context="management-cluster")
# Read from source cluster
get_secrets(namespace="app", context="source-cluster")
# Apply to target cluster (via manifest)
apply_manifest(secret_manifest, namespace="app", context="target-cluster")
With Cilium ClusterMesh or Istio multi-cluster:
cilium_nodes_list_tool(context="cluster-1")
istio_proxy_status_tool(context="cluster-2")
- prod-us-east-1, staging-eu-west-1
- Prod: Read-only for most users - Dev: Full access for developers
``` # Explicit is better get_pods(namespace="app", context="production") ```
- Production: prod-* - Staging: staging-* - Development: dev-*
安装 Kubernetes Skills 后,可以对 AI 说这些话来触发它
Help me get started with Kubernetes Skills
Explains what Kubernetes Skills does, walks through the setup, and runs a quick demo based on your current project
Use Kubernetes Skills to manage multiple Kubernetes clusters, switch contexts, and perform c...
Invokes Kubernetes Skills with the right parameters and returns the result directly in the conversation
What can I do with Kubernetes Skills in my developer & devops workflow?
Lists the top use cases for Kubernetes Skills, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/k8-multicluster/ 目录(个人级,所有项目可用),或 .claude/skills/k8-multicluster/(项目级)。重启 AI 客户端后,用 /k8-multicluster 主动调用,或让 AI 根据上下文自动发现并使用。
Kubernetes Skills 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Kubernetes Skills 可免费安装使用。请查阅仓库了解许可证信息。
Manage multiple Kubernetes clusters, switch contexts, and perform cross-cluster operations. Use when working with multiple clusters, comparing environments, or managing cluster lifecycle.
Kubernetes Skills 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using Kubernetes Skills
Identifies repetitive steps in your workflow and sets up Kubernetes Skills to handle them automatically