Cluster API lifecycle management for provisioning, scaling, and upgrading Kubernetes clusters. Use when managing cluster infrastructure or multi-cluster operations.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install k8s-capi或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install k8s-capi⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/k8s-capi/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: k8s-capi description: Cluster API lifecycle management for provisioning, scaling, and upgrading Kubernetes clusters. Use when managing cluster infrastructure or multi-cluster operations. ---
Manage Kubernetes clusters using kubectl-mcp-server's Cluster API tools (11 tools).
capi_detect_tool()
# List all CAPI clusters
capi_clusters_list_tool(namespace="default")
# Shows:
# - Cluster name
# - Phase (Provisioning, Provisioned, Deleting)
# - Infrastructure ready
# - Control plane ready
capi_cluster_get_tool(name="my-cluster", namespace="default")
# Shows:
# - Spec (control plane, infrastructure)
# - Status (phase, conditions)
# - Network configuration
# Get kubeconfig for workload cluster
capi_cluster_kubeconfig_tool(name="my-cluster", namespace="default")
# Returns kubeconfig to access the cluster
capi_machines_list_tool(namespace="default")
# Shows:
# - Machine name
# - Cluster
# - Phase (Running, Provisioning, Failed)
# - Provider ID
# - Version
capi_machine_get_tool(name="my-cluster-md-0-xxx", namespace="default")
capi_machinedeployments_list_tool(namespace="default")
# Shows:
# - Deployment name
# - Cluster
# - Replicas (ready/total)
# - Version
# Scale worker nodes
capi_machinedeployment_scale_tool(
name="my-cluster-md-0",
namespace="default",
replicas=5
)
capi_machinesets_list_tool(namespace="default")
capi_machinehealthchecks_list_tool(namespace="default")
# Health checks automatically remediate unhealthy machines
# List cluster templates
capi_clusterclasses_list_tool(namespace="default")
# ClusterClasses define reusable cluster configurations
kubectl_apply(manifest="""
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
name: my-cluster
namespace: default
spec:
clusterNetwork:
pods:
cidrBlocks:
- 192.168.0.0/16
services:
cidrBlocks:
- 10.96.0.0/12
controlPlaneRef:
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
kind: KubeadmControlPlane
name: my-cluster-control-plane
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: AWSCluster
name: my-cluster
""")
kubectl_apply(manifest="""
apiVersion: cluster.x-k8s.io/v1beta1
kind: MachineDeployment
metadata:
name: my-cluster-md-0
namespace: default
spec:
clusterName: my-cluster
replicas: 3
selector:
matchLabels:
cluster.x-k8s.io/cluster-name: my-cluster
template:
spec:
clusterName: my-cluster
version: v1.28.0
bootstrap:
configRef:
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
name: my-cluster-md-0
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: AWSMachineTemplate
name: my-cluster-md-0
""")
1. kubectl_apply(cluster_manifest)
2. capi_clusters_list_tool(namespace) # Wait for Provisioned
3. capi_cluster_kubeconfig_tool(name, namespace) # Get access
1. capi_machinedeployments_list_tool(namespace)
2. capi_machinedeployment_scale_tool(name, namespace, replicas)
3. capi_machines_list_tool(namespace) # Monitor
1. # Update control plane version
2. # Update machine deployment version
3. capi_machines_list_tool(namespace) # Monitor rollout
1. capi_cluster_get_tool(name, namespace) # Check conditions
2. capi_machines_list_tool(namespace) # Check machine status
3. get_events(namespace) # Check events
4. # Check infrastructure provider logs
1. capi_machine_get_tool(name, namespace)
2. get_events(namespace)
3. # Common issues:
# - Cloud provider quota
# - Invalid machine template
# - Network issues
安装 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 cluster API lifecycle management for provisioning, scaling, and upg...
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/k8s-capi/ 目录(个人级,所有项目可用),或 .claude/skills/k8s-capi/(项目级)。重启 AI 客户端后,用 /k8s-capi 主动调用,或让 AI 根据上下文自动发现并使用。
Kubernetes Skills 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Kubernetes Skills 可免费安装使用。请查阅仓库了解许可证信息。
Cluster API lifecycle management for provisioning, scaling, and upgrading Kubernetes clusters. Use when managing cluster infrastructure or multi-cluster operations.
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