Cluster API Lifecycle Management
БесплатноБез исполняемых скриптовНе проверенCluster API lifecycle management for provisioning, scaling, and upgrading Kubernetes clusters. Use when managing cluster infrastructure or multi-cluster…
от rohitg003 526 установок в других каталогахОб этом скилле
Cluster API Lifecycle Management
Manage Kubernetes clusters using kubectl-mcp-server's Cluster API tools (11 tools).
Requires the
capitoolset: start kubectl-mcp-server with--toolsets default,capi(orMCP_TOOLSETS=default,capi).
When to Apply
Use this skill when:
- User mentions: "Cluster API", "CAPI", "cluster lifecycle", "machine", "workload cluster"
- Operations: provisioning clusters, scaling nodes, upgrading Kubernetes versions
- Keywords: "provision cluster", "scale workers", "machine deployment", "cluster class"
Priority Rules
| Priority | Rule | Impact | Tools |
|---|---|---|---|
| 1 | Detect CAPI installation first | CRITICAL | detect_ecosystem |
| 2 | Check cluster phase before operations | HIGH | capi_get_cluster |
| 3 | Monitor machines during scaling | HIGH | capi_list_machines |
| 4 | Get kubeconfig after provisioning | MEDIUM | capi_get_cluster_kubeconfig |
Quick Reference
| Task | Tool | Example |
|---|---|---|
| Detect CAPI | detect_ecosystem |
detect_ecosystem() |
| List clusters | capi_list_clusters |
capi_list_clusters(namespace) |
| Get cluster kubeconfig | capi_get_cluster_kubeconfig |
capi_get_cluster_kubeconfig(name, namespace) |
| Scale workers | capi_scale_machinedeployment |
capi_scale_machinedeployment(name, namespace, replicas) |
Check Installation
detect_ecosystem()
List Clusters
# List all CAPI clusters
capi_list_clusters(namespace="default")
# Shows:
# - Cluster name
# - Phase (Provisioning, Provisioned, Deleting)
# - Infrastructure ready
# - Control plane ready
Get Cluster Details
capi_get_cluster(name="my-cluster", namespace="default")
# Shows:
# - Spec (control plane, infrastructure)
# - Status (phase, conditions)
# - Network configuration
Get Cluster Kubeconfig
# Get kubeconfig for workload cluster
capi_get_cluster_kubeconfig(name="my-cluster", namespace="default")
# Returns kubeconfig to access the cluster
Machines
List Machines
capi_list_machines(namespace="default")
# Shows:
# - Machine name
# - Cluster
# - Phase (Running, Provisioning, Failed)
# - Provider ID
# - Version
Get Machine Details
capi_get_machine(name="my-cluster-md-0-xxx", namespace="default")
Machine Deployments
List Machine Deployments
capi_list_machinedeployments(namespace="default")
# Shows:
# - Deployment name
# - Cluster
# - Replicas (ready/total)
# - Version
Scale Machine Deployment
# Scale worker nodes
capi_scale_machinedeployment(
name="my-cluster-md-0",
namespace="default",
replicas=5
)
Machine Sets
capi_list_machinesets(namespace="default")
Machine Health Checks
capi_list_machinehealthchecks(namespace="default")
# Health checks automatically remediate unhealthy machines
Cluster Classes
# List cluster templates
capi_list_clusterclasses(namespace="default")
# ClusterClasses define reusable cluster configurations
Create Cluster
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
""")
Create Machine Deployment
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
""")
Cluster Lifecycle Workflows
Provision New Cluster
1. kubectl_apply(cluster_manifest)
2. capi_list_clusters(namespace) # Wait for Provisioned
3. capi_get_cluster_kubeconfig(name, namespace) # Get access
Scale Workers
1. capi_list_machinedeployments(namespace)
2. capi_scale_machinedeployment(name, namespace, replicas)
3. capi_list_machines(namespace) # Monitor
Upgrade Cluster
1. # Update control plane version
2. # Update machine deployment version
3. capi_list_machines(namespace) # Monitor rollout
Troubleshooting
Cluster Stuck Provisioning
1. capi_get_cluster(na
Установить Cluster API Lifecycle Management в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Cluster API Lifecycle Management?
Cluster API lifecycle management for provisioning, scaling, and upgrading Kubernetes clusters. Use when managing cluster infrastructure or multi-cluster operations.
Как установить скилл Cluster API Lifecycle Management?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Cluster API Lifecycle Management запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic