triagekit-mcp-k8s-triage

v0.1.0
triagekit-mcp-k8s-triage Checked 1 day ago Published 4 months ago

MCP server that diagnoses unhealthy Kubernetes workloads and finds resource right-sizing candidates using real cluster state - not another kubectl wrapper.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

diagnose_workload

Diagnose an unhealthy pod or deployment: reads container status, restart counts, and recent events, then maps failures to a ranked category (OOMKilled, image-pull error, config error, probe failure, scheduling failure) with supporting evidence.

ParameterTypeDescription
name *stringPod name (kind="pod") or Deployment name (kind="deployment").
namespace *stringKubernetes namespace.
contextOptional kubeconfig context name; uses the current context if omitted.
kindstring"pod" or "deployment".

explain_pod_events

Order a pod's raw Kubernetes events into a time-sequenced narrative.

ParameterTypeDescription
namespace *stringKubernetes namespace.
pod *stringPod name.
contextOptional kubeconfig context name; uses the current context if omitted.

get_pod_logs_since_last_restart

Fetch a container's logs starting from its current run (auto-detected from the container's own startedAt), so a prior crash's logs don't drown out the current state.

ParameterTypeDescription
namespace *stringKubernetes namespace.
pod *stringPod name.
containerContainer name; defaults to the pod's first container if omitted.
contextOptional kubeconfig context name; uses the current context if omitted.
tail_linesintegerMaximum number of log lines to return.

correlate_crashloop_with_recent_changes

Check whether a deployment's crashing containers' last crash times line up with a recent rollout (new ReplicaSet revision) - a signal the crash is deploy-related rather than a pre-existing latent bug.

ParameterTypeDescription
name *stringDeployment name.
namespace *stringKubernetes namespace.
contextOptional kubeconfig context name; uses the current context if omitted.
window_minutesintegerHow many minutes before a crash a rollout still counts as related.

find_resource_right_sizing_candidates

Compare each container's actual CPU/memory usage (p95 over the lookback window, from Prometheus) against its requested resources, flagging over- and under-provisioned workloads with a suggested new request value. Requires Prometheus to be configured (TRIAGEKIT_K8S_TRIAGE_PROMETHEUS_URL or PROMETHEUS_URL) - metrics-server alone only exposes a current snapshot, not history.

ParameterTypeDescription
namespace *stringKubernetes namespace to analyze.
contextOptional kubeconfig context name; uses the current context if omitted.
lookback_daysintegerHow many days of usage history to consider.

cluster_health_summary

One-shot cluster (or namespace) health digest: node pressure, failed/pending pods, PodDisruptionBudgets with zero disruptions allowed, and HPAs pinned at max replicas.

ParameterTypeDescription
contextOptional kubeconfig context name; uses the current context if omitted.
namespaceRestrict to this namespace; omit for a cluster-wide summary.