Rohit Ghumare

Kubernetes Skills

运维安全v1.0.0
作者:Rohit Ghumare更新于 2026-05-18k8-multicluster@clawhub_rohitg00/k8-multicluster
服务器运维DevOps#Kubernetes

据 AlphaMoat 统计,截至 2026-09,Kubernetes Skills 累计下载 3,839 次、获 3 个星标,在全部 5,078 个 AI 技能中排名第 2,728 位,在「运维安全」分类(264 个)中排名第 164 位。

累计安装
116
累计下载
3,839
星标
3
全站排名
#2,728
全站前 54% · 「运维安全」前 63%
平台累计安装累计下载星标评论
ClawHub ↗1163,53335
SkillHub ↗1153,8393—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

该技能涵盖集群查询、环境比较、生命周期管理、Helm、GitOps 和联邦工作流。不同上下文可能指向生产环境;执行扩缩容或应用变更前,应确认集群、命名空间和操作范围。 使用最小权限凭据,生产环境默认只读,启用审计日志,写入前取得批准。

资料发布于 2026-10-29

可以用来做什么

  • 查看或比较多个集群中的工作负载

什么时候用

  • 需要跨集群检查资源或管理集群生命周期时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

总结跨集群管理功能,并列出执行变更前需要确认的集群范围。

月度数据趋势

累计下载3,839
2,1543,0593,9642026-03 · 累计下载 2,2792026-05 · 累计下载 2,8802026-07 · 累计下载 3,2452026-08 · 累计下载 3,4422026-09 · 累计下载 3,83926-0326-09
星标3
2342026-03 · 星标 32026-05 · 星标 32026-07 · 星标 32026-08 · 星标 32026-09 · 星标 326-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-093,839—3
2026-083,442+6.1%3
2026-073,245—3
2026-052,880—3
2026-032,279—3

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

4.0 KB · SkillHub v1.0.0
---
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.
---

# Multi-Cluster Kubernetes Management

Cross-cluster operations and context management using kubectl-mcp-server's multi-cluster support.

## Context Management
展开全部(共 187 行)

### List Available Contexts
```
list_contexts_tool()
```

### View Current Context
```
kubeconfig_view()  # Shows sanitized kubeconfig
```

### Switch Context
CLI: `kubectl-mcp-server context <context-name>`

## Cross-Cluster Operations

All kubectl-mcp-server tools support the `context` parameter:

```python
# Get pods from production cluster
get_pods(namespace="default", context="production-cluster")

# Get pods from staging cluster
get_pods(namespace="default", context="staging-cluster")
```

## Common Multi-Cluster Patterns

### Compare Environments

```
# Compare deployment across clusters
compare_namespaces(
    namespace1="production",
    namespace2="staging",
    resource_type="deployment",
    context="production-cluster"
)
```

### Parallel Queries
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")
```

### Cross-Cluster Health Check
```
# Check all clusters
for context in ["prod-1", "prod-2", "staging"]:
    get_nodes(context=context)
    get_pods(namespace="kube-system", context=context)
```

## Cluster API (CAPI) Management

For managing cluster lifecycle:

### List Managed Clusters
```
capi_clusters_list_tool(namespace="capi-system")
```

### Get Cluster Details
```
capi_cluster_get_tool(name="prod-cluster", namespace="capi-system")
```

### Get Workload Cluster Kubeconfig
```
capi_cluster_kubeconfig_tool(name="prod-cluster", namespace="capi-system")
```

### Machine Management
```
capi_machines_list_tool(namespace="capi-system")
capi_machinedeployments_list_tool(namespace="capi-system")
```

### Scale Cluster
```
capi_machinedeployment_scale_tool(
    name="prod-cluster-md-0",
    namespace="capi-system",
    replicas=5
)
```

See [CONTEXT-SWITCHING.md](CONTEXT-SWITCHING.md) for detailed patterns.

## Multi-Cluster Helm

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"
)
```

## Multi-Cluster GitOps

### Flux Across Clusters
```
flux_kustomizations_list_tool(
    namespace="flux-system",
    context="cluster-1"
)

flux_reconcile_tool(
    kind="kustomization",
    name="apps",
    namespace="flux-system",
    context="cluster-2"
)
```

### ArgoCD Across Clusters
```
argocd_apps_list_tool(namespace="argocd", context="management-cluster")
```

## Federation Patterns

### Secret Synchronization
```
# 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")
```

### Cross-Cluster Service Discovery
With Cilium ClusterMesh or Istio multi-cluster:
```
cilium_nodes_list_tool(context="cluster-1")
istio_proxy_status_tool(context="cluster-2")
```

## Best Practices

1. **Naming Convention**: Use descriptive context names
   - `prod-us-east-1`, `staging-eu-west-1`

2. **Access Control**: Different kubeconfigs per environment
   - Prod: Read-only for most users
   - Dev: Full access for developers

3. **Always Specify Context**: Avoid accidental cross-cluster operations
   ```
   # Explicit is better
   get_pods(namespace="app", context="production")
   ```

4. **Cluster Groups**: Organize by purpose
   - Production: `prod-*`
   - Staging: `staging-*`
   - Development: `dev-*`

## Related Skills
- [k8s-troubleshoot](../k8s-troubleshoot/SKILL.md) - Debug across clusters
- [k8s-gitops](../k8s-gitops/SKILL.md) - GitOps multi-cluster

「运维安全」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。