360 Secure SkillHub
360 安全技能中心

Kubernetes Diagnostics

该 Skill 通过 kubectl-mcp-server 的 diagnostics 与 multicluster 工具集,调用 health_check、kubectl_top、compare_namespaces 等工具,提供 Kubernetes 集群健康检查、Pod/节点资源指标、命名空间与环境对比、节点摘要和 API 资源发现,适用于容量分析、部署前检查和事故后诊断。

分类:开发
rohitg00
rohitg00
热度 3.31
最近更新 2026-10-22 22:29:31

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add rohitg00/k8s-diagnostics
兼容性
通用兼容
联网要求
需要联网
数据出网
数据出网未确认
Metadata
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
MIT-0
metadata
{"author":"rohitg00","version":"2.0.0","tools":10,"category":"observability"}

Kubernetes Diagnostics

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

Requires the diagnostics, multicluster toolsets: start kubectl-mcp-server with --toolsets default,diagnostics,multicluster (or MCP_TOOLSETS=default,diagnostics,multicluster).

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

Priority Rule Impact Tools
1 Check metrics-server before using metrics CRITICAL kubectl_top
2 Run health check before deployments HIGH health_check
3 Compare staging vs prod before release MEDIUM compare_namespaces
4 Document baseline metrics LOW get_nodes_summary

Quick Reference

Task Tool Example
Cluster health health_check health_check()
Pod metrics kubectl_top kubectl_top(namespace)
Node summary get_nodes_summary get_nodes_summary()
Compare envs compare_namespaces compare_namespaces(ns1, ns2, type)
List CRDs kubectl_get kubectl_get(resource_type="crds")

Resource Metrics

kubectl_top(namespace="default")

kubectl_top(resource="nodes")

kubectl_top(resource="pods", namespace="default", sort_by="cpu")

kubectl_top(resource="pods", namespace="default", sort_by="memory")

Cluster Health Check

health_check()

health_check()

Compare Environments

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

kubectl_get(resource_type="deployments", namespace="default", context="staging-cluster")
kubectl_get(resource_type="deployments", namespace="default", context="prod-cluster")

API Discovery

get_api_resources()

kubectl_get(resource_type="crds", name="certificates.cert-manager.io")

kubectl_get(resource_type="crds")

Resource Analysis

get_nodes_summary()

kubeconfig_view()

list_contexts()

Diagnostic Workflows

Cluster Overview

health_check()
get_nodes_summary()
kubectl_get(resource_type="events", namespace="")
kubectl_get(resource_type="crds")

Pre-deployment Check

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

Post-incident Analysis

kubectl_get(resource_type="events", namespace)
kubectl_logs(name, namespace, previous=True)
kubectl_top(namespace)
kubectl_describe(name)

Related Skills