Loading...
Loading...
Manage multiple Kubernetes clusters, switch contexts, and perform cross-cluster operations. Use when working with multiple clusters, comparing environments, or managing cluster lifecycle.
npx skill4agent add rohitg00/kubectl-mcp-server k8s-multicluster| Priority | Rule | Impact | Tools |
|---|---|---|---|
| 1 | Always specify context for prod | CRITICAL | |
| 2 | List contexts before switching | HIGH | |
| 3 | Compare before promoting | MEDIUM | |
| 4 | Use naming conventions | LOW | |
| Task | Tool | Example |
|---|---|---|
| List contexts | | |
| View kubeconfig | | |
| List CAPI clusters | | |
| Get CAPI kubeconfig | | |
list_contexts_tool()kubeconfig_view()kubectl-mcp-server context <context-name>contextget_pods(namespace="default", context="production-cluster")
get_pods(namespace="default", context="staging-cluster")compare_namespaces(
namespace1="production",
namespace2="staging",
resource_type="deployment",
context="production-cluster"
)get_pods(namespace="app", context="prod-us-east")
get_pods(namespace="app", context="prod-eu-west")
get_pods(namespace="app", context="development")for context in ["prod-1", "prod-2", "staging"]:
get_nodes(context=context)
get_pods(namespace="kube-system", context=context)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
)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")get_secrets(namespace="app", context="source-cluster")
kubectl_apply(secret_manifest, namespace="app", context="target-cluster")cilium_nodes_list_tool(context="cluster-1")
istio_proxy_status_tool(context="cluster-2")prod-us-east-1staging-eu-west-1prod-*staging-*dev-*