Prerequisites
- A kubeconfig file (typically
~/.kube/config) or its raw YAML content - Read access to the namespaces you want to investigate (
get/liston pods, deployments, events, logs)
Setup
Option 1: Interactive CLI
- kubeconfig — paste the raw kubeconfig YAML, or provide a file path that will be read and stored inline
- Context — optional; leave blank to use the kubeconfig’s current context
- Default namespace — defaults to
default
Option 2: Environment variables
Option 3: Verify connectivity
Available tools
| Tool | What it does |
|---|---|
kubernetes_list_pods | List pods in a namespace with phase, readiness, and restart counts |
kubernetes_get_pod_logs | Fetch recent log lines from a pod container |
kubernetes_list_deployments | List deployments with desired/ready/available replica counts |
kubernetes_get_events | List cluster events — crash loops, OOM kills, scheduling failures |
kubernetes_describe_pod | Fetch full spec, status, and container states for a single pod |
kubernetes_list_nodes | List cluster nodes with conditions, capacity, and allocatable resources |
kubernetes_list_services | List services with their type, clusterIP, ports, and selector |
kubernetes_list_statefulsets | List StatefulSets with desired/ready/current/updated replica counts |
kubernetes_list_daemonsets | List DaemonSets with desired/current/ready/available counts |
kubernetes_list_ingresses | List Ingress resources with routing rules, host→service path mappings, and TLS config |
kubernetes_list_configmaps | List ConfigMaps with their key-value data |
kubernetes_get_resource | Fetch a single named resource by type and name (pods, deployments, statefulsets, daemonsets, services, ingresses, configmaps, replicasets, pvcs, nodes) |
Configuration reference
| Field | Environment variable | Default | Description |
|---|---|---|---|
kubeconfig | KUBECONFIG_CONTENT or read from KUBECONFIG | — | Raw kubeconfig YAML (required) |
context | KUBECONFIG_CONTEXT | current context | Kubeconfig context to activate |
namespace | KUBECONFIG_NAMESPACE | default | Default namespace for tool queries |
Example: investigating a crash-looping pod
- Call
kubernetes_list_podsscoped toproductionto find pods with high restart counts - Call
kubernetes_get_pod_logsto read recent container output - Call
kubernetes_get_eventswithinvolvedObject.name=payments-apito surface Warning events - Correlate the evidence into a root-cause summary