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

# Kubernetes (Live)

> Anyshift streams live Kubernetes cluster state via an in-cluster agent and correlates it with your Terraform and application code.

## Overview

The Anyshift Kubernetes agent runs in your cluster and streams **live resource state** to Annie's knowledge graph in near real-time. That live state is linked back to your Terraform declarations (for resources Terraform manages) and your application code, giving Annie a full picture from *declared* to *actually running*.

<Note>
  For installation and setup, see the [Kubernetes integration page](/pages/integration/kubernetes). This page focuses on **what Annie does** with the data.
</Note>

## What the Agent Captures

* Pods, Deployments, ReplicaSets, StatefulSets, DaemonSets
* Services, Ingresses
* ConfigMaps, Secrets
* PersistentVolumeClaims, PersistentVolumes
* Namespaces, Nodes
* RBAC (Roles, RoleBindings, ClusterRoles, ClusterRoleBindings)
* HorizontalPodAutoscalers, PodDisruptionBudgets
* Jobs, CronJobs
* KEDA ScaledObjects / ScaledJobs
* ...

<Tip>
  **Helm-deployed workloads** are visible too: Annie sees the Kubernetes resources that Helm created. Release-level metadata (chart version, revision history) isn't modeled as a first-class entity today.
</Tip>

## What You Can Ask Annie

<AccordionGroup>
  <Accordion icon="cubes" title="Live cluster state">
    * *"How many pods are running in the `payments` namespace?"*
    * *"Which deployments have zero available replicas?"*
    * *"Show me all pods in CrashLoopBackOff"*
    * *"Which services expose port 443?"*
  </Accordion>

  <Accordion icon="code-compare" title="Declared vs. actual">
    * *"Are my declared replica counts matching what's actually running?"*
    * *"Which workloads have fewer ready pods than desired?"*
    * *"Show me resources in the cluster that weren't deployed by Helm or Terraform"*
  </Accordion>

  <Accordion icon="diagram-project" title="Cross-layer impact">
    * *"Which Terraform module provisioned this cluster?"*
    * *"What application code runs in this pod?"*
    * *"Which RDS instance does this deployment connect to?"*
  </Accordion>
</AccordionGroup>

## Real-World Example

<AccordionGroup>
  <Accordion icon="fire" title="Scaling incident">
    Checkout service is slow. I want to know if it's a scaling issue.

    *"Is the checkout service scaled correctly?"*

    > The `checkout` deployment is declared with `replicas: 8`.
    >
    > * 8 ReplicaSet replicas scheduled
    > * **Only 5 pods Ready** (3 are `ImagePullBackOff` on `checkout:v2.3.1`)
    > * HPA is at max (`target: 80% CPU`, `current: 94%`)
    >
    > The underlying image pull is failing, likely a registry auth issue introduced by the latest deploy.
  </Accordion>
</AccordionGroup>

## Get Started

<CardGroup cols={2}>
  <Card title="Install the agent" icon="cubes" href="/pages/integration/kubernetes">
    Deploy the Anyshift Kubernetes agent via Helm.
  </Card>

  <Card title="IaC overview" icon="code" href="/pages/iac/overview">
    See how live K8s state fits into the three-universe model.
  </Card>
</CardGroup>
