> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudthinker.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Kubernetes Health Monitoring

> Use Kai to monitor EKS cluster health, surface resource waste, and get HPA recommendations before problems reach production.

Kai monitors your Amazon EKS cluster continuously, surfacing over-provisioned pods, underutilized nodes, and missing autoscaling policies before they cause outages.

## The scenario

A platform team runs a production EKS cluster across several namespaces. CPU alerts are intermittent but investigation is slow—engineers run manual `kubectl` commands across hundreds of pods to correlate logs, metrics, and events.

<Frame>
  <img src="https://mintcdn.com/cloudthinker/0IKJjKZJEIROke98/images/use-cases/kubernetes-health-monitoring/01-manual-troubleshooting-challenges.jpg?fit=max&auto=format&n=0IKJjKZJEIROke98&q=85&s=b0ee7de46d34538911ac646b3c1356e2" alt="Manual Kubernetes troubleshooting challenges across namespaces and resources" width="1152" height="1136" data-path="images/use-cases/kubernetes-health-monitoring/01-manual-troubleshooting-challenges.jpg" />
</Frame>

<p style={{textAlign: 'center', fontSize: '0.9em', color: '#666', marginTop: '8px'}}>Manual Kubernetes troubleshooting challenges</p>

The team asks Kai to assess the cluster end-to-end, identify resource waste, and recommend autoscaling policies where they are missing.

## Walkthrough

<Steps>
  ### Connect Kai to your cluster

  Follow the [Kubernetes connection guide](/guide/connections/kubernetes) to give Kai access to your EKS cluster. Once the connection shows **Connected**, Kai can query the cluster directly.

  ### Analyze pod resource utilization

  ```text theme={null}
  @kai #report analyze pod resource utilization in production namespace
  ```

  <Frame>
    <img src="https://mintcdn.com/cloudthinker/0IKJjKZJEIROke98/images/use-cases/kubernetes-health-monitoring/02-pod-resource-utilization.jpg?fit=max&auto=format&n=0IKJjKZJEIROke98&q=85&s=e222d8a917b6ed474e862b78092b45bb" alt="Pod resource utilization analysis showing CPU and memory usage patterns" width="2236" height="1546" data-path="images/use-cases/kubernetes-health-monitoring/02-pod-resource-utilization.jpg" />
  </Frame>

  <p style={{textAlign: 'center', fontSize: '0.9em', color: '#666', marginTop: '8px'}}>Pod resource utilization analysis</p>

  <Frame>
    <img src="https://mintcdn.com/cloudthinker/0IKJjKZJEIROke98/images/use-cases/kubernetes-health-monitoring/03-pod-analysis-visualization.jpg?fit=max&auto=format&n=0IKJjKZJEIROke98&q=85&s=3ab99f44bf3d440f29c803b422a48010" alt="Pod analysis visualization with performance recommendations" width="2240" height="1544" data-path="images/use-cases/kubernetes-health-monitoring/03-pod-analysis-visualization.jpg" />
  </Frame>

  <p style={{textAlign: 'center', fontSize: '0.9em', color: '#666', marginTop: '8px'}}>Pod analysis visualization with performance recommendations</p>

  Kai surfaces three findings: auth-service and notification-worker are over-provisioned (18–21% CPU), api-gateway and cache-redis are appropriately sized, and payment-processor is dangerously under-provisioned at 80–86% CPU and 88–94% memory—at high risk of OOM kills and service disruption.

  ### Identify underutilized nodes

  ```text theme={null}
  @kai #chart identify nodes with <30% CPU utilization
  ```

  <Frame>
    <img src="https://mintcdn.com/cloudthinker/0IKJjKZJEIROke98/images/use-cases/kubernetes-health-monitoring/04-node-cpu-utilization.jpg?fit=max&auto=format&n=0IKJjKZJEIROke98&q=85&s=6faab9bb595868b7077bc4e287558a51" alt="Node CPU utilization analysis showing underutilized instances and cost waste" width="2236" height="1544" data-path="images/use-cases/kubernetes-health-monitoring/04-node-cpu-utilization.jpg" />
  </Frame>

  <p style={{textAlign: 'center', fontSize: '0.9em', color: '#666', marginTop: '8px'}}>Node CPU utilization analysis showing underutilized instances</p>

  Kai finds five nodes averaging below 30% CPU (some as low as 12–15%), wasting approximately \$573 per month. Oversized t3.xlarge instances running lightweight workloads—combined with poor pod scheduling—leave some nodes with only 2–3 pods while others carry 8–9.

  ### Get HPA recommendations

  ```text theme={null}
  @kai #recommend HPA policies for web deployments
  ```

  <Frame>
    <img src="https://mintcdn.com/cloudthinker/0IKJjKZJEIROke98/images/use-cases/kubernetes-health-monitoring/05-hpa-policy-recommendations.jpg?fit=max&auto=format&n=0IKJjKZJEIROke98&q=85&s=c017e66acc6cba7ad980435e31c99a83" alt="HPA policy recommendations for web deployment auto-scaling configuration" width="2238" height="1552" data-path="images/use-cases/kubernetes-health-monitoring/05-hpa-policy-recommendations.jpg" />
  </Frame>

  <p style={{textAlign: 'center', fontSize: '0.9em', color: '#666', marginTop: '8px'}}>HPA policy recommendations for auto-scaling</p>

  Kai flags payment-processor as critically at risk—only 2 replicas at 80–86% CPU, no autoscaling in place. It recommends adding HPA to api-gateway to handle traffic spikes, and removing excess capacity from user-service and auth-service.
</Steps>

## What made this work

* **[Kai](/guide/agents/kai)** queries the cluster API directly, replacing manual `kubectl` sessions and tool-switching.
* **Cross-layer correlation** links pod utilization, node capacity, and scheduling patterns in a single analysis pass.
* **[`#report`](/guide/language) and [`#chart`](/guide/language)** produce structured output Kai can reason over before surfacing findings.
* **[`#recommend`](/guide/language)** generates actionable HPA policy changes rather than a raw metrics dump.
* **[CloudKeepers](/guide/infrastructure/cloudkeepers)** can run this analysis on a schedule so findings arrive before on-call engineers are paged.

## Try it yourself

<CardGroup cols={2}>
  <Card title="Kai agent reference" icon="robot" href="/guide/agents/kai">
    Full capabilities of Kai, the Kubernetes Engineer agent
  </Card>

  <Card title="Kubernetes connection" icon="https://mintcdn.com/cloudthinker/aLd-ttc-SCW-aFky/images/icons/kubernetes.svg?fit=max&auto=format&n=aLd-ttc-SCW-aFky&q=85&s=7c03292954ff635a1994623a5c39971b" href="/guide/connections/kubernetes" width="24" height="24" data-path="images/icons/kubernetes.svg">
    Step-by-step guide to connecting CloudThinker to your EKS cluster
  </Card>

  <Card title="Topology Explorer" icon="diagram-project" href="/guide/infrastructure/topology">
    Map Kubernetes service dependencies for faster incident root cause analysis
  </Card>

  <Card title="CloudKeepers" icon="radar" href="/guide/infrastructure/cloudkeepers">
    Run continuous health checks across your Kubernetes workloads automatically
  </Card>
</CardGroup>
