界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
部署与运维 · SKILL.md

k8s-diagnostics

k8s-diagnostics

【部署与运维】Kubernetes diagnostics for metrics, health checks, resource comparisons, and cluster analysis. Use when analyzing cluster health, comparing environments, or gathering diagnostic data.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: k8s-diagnostics description: Kubernetes diagnostics for metrics, health checks, resource comparisons, and cluster analysis. Use when analyzing cluster health, comparing environments, or gathering diagnostic data. license: Apache-2.0 metadata: author: rohitg00 version: "1.0.0" tools: 10 category: observability

Kubernetes Diagnostics

Analyze cluster health and compare resources using kubectl-mcp-server's diagnostic tools.

When to Apply

Use this skill when:

  • User mentions: "metrics", "health check", "compare", "analysis", "capacity"
  • Operations: cluster health assessment, environment comparison, resource analysis
  • Keywords: "how much", "usage", "difference between", "capacity planning"

Priority Rules

PriorityRuleImpactTools
1Check metrics-server before using metricsCRITICALget_resource_metrics
2Run health check before deploymentsHIGHcluster_health_check
3Compare staging vs prod before releaseMEDIUMcompare_namespaces
4Document baseline metricsLOWget_nodes_summary

Quick Reference

TaskToolExample
Cluster healthcluster_health_checkcluster_health_check()
Pod metricsget_resource_metricsget_resource_metrics(namespace)
Node summaryget_nodes_summaryget_nodes_summary()
Compare envscompare_namespacescompare_namespaces(ns1, ns2, type)
List CRDslist_crdslist_crds()

Resource Metrics

get_resource_metrics(namespace="default")

get_node_metrics()

get_top_pods(namespace="default", sort_by="cpu")

get_top_pods(namespace="default", sort_by="memory")

Cluster Health Check

cluster_health_check()

get_cluster_info()

Compare Environments

compare_namespaces(
    namespace1="staging",
    namespace2="production",
    resource_type="deployment"
)

compare_namespaces(
    namespace1="default",
    namespace2="default",
    resource_type="deployment",
    context1="staging-cluster",
    context2="prod-cluster"
)

API Discovery

get_api_versions()

check_crd_exists(crd_name="certificates.cert-manager.io")

list_crds()

Resource Analysis

get_nodes_summary()

kubeconfig_view()

list_contexts_tool()

Diagnostic Workflows

Cluster Overview

cluster_health_check()
get_nodes_summary()
get_events(namespace="")
list_crds()

Pre-deployment Check

get_resource_metrics(namespace="production")
get_nodes_summary()
compare_namespaces(namespace1="staging", namespace2="prod", resource_type="deployment")

Post-incident Analysis

get_events(namespace)
get_pod_logs(name, namespace, previous=True)
get_resource_metrics(namespace)
describe_node(name)

Related Skills

我的收藏