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

# Cluster States

> Understanding Ankra Kubernetes Cluster States

## What Are Cluster States?

Cluster states in Ankra indicate whether the Ankra Agent running in your Kubernetes cluster is currently connected to the Ankra platform. This provides a simple, reliable signal of your cluster's availability for management and monitoring.

Ankra supports two cluster states:

* **Online:** The Ankra Agent in your cluster is connected to the Ankra platform. This means your cluster is reachable, healthy, and ready for management operations.
* **Offline:** The Ankra Agent is not connected to the Ankra platform. This usually means your cluster is unreachable-possibly due to network issues, cluster shutdown, or maintenance.

***

## Cluster States

<CardGroup cols={2}>
  <Card title="Online" icon="signal">
    <b>Cluster is reachable and healthy.</b>

    <ul>
      <li>Ankra Agent is connected to the platform.</li>
      <li>Kubernetes API is accessible via the agent.</li>
      <li>Ready for deployments, monitoring, and management operations.</li>
      <li>All platform features are available.</li>
    </ul>
  </Card>

  <Card title="Offline" icon="circle">
    <b>Cluster is not reachable.</b>

    <ul>
      <li>Ankra Agent is disconnected from the platform.</li>
      <li>May be due to network issues, cluster shutdown, or maintenance.</li>
      <li>Cannot deploy stacks or view live resources.</li>
      <li>Historical data and configuration remain available.</li>
    </ul>
  </Card>
</CardGroup>

***

## Why Do Cluster States Matter?

<CardGroup cols={2}>
  <Card title="Visibility" icon="eye">
    Instantly see which clusters are connected and available for management across your entire infrastructure.
  </Card>

  <Card title="Platform Access" icon="lock-open">
    When online, deploy stacks, browse Kubernetes resources, view logs, and manage add-ons. Offline clusters preserve configuration but cannot be actively managed.
  </Card>

  <Card title="Troubleshooting" icon="wrench">
    Quickly identify connectivity issues. An offline state often indicates network problems, agent issues, or cluster maintenance.
  </Card>

  <Card title="Monitoring" icon="chart-line">
    Use cluster states with alerts to get notified when clusters go offline unexpectedly.
  </Card>
</CardGroup>

***

## Viewing Cluster State

You can view the current state of any cluster:

1. **Clusters List:** The main Clusters page shows Online/Offline status for all clusters
2. **Cluster Dashboard:** The cluster overview page displays connection status
3. **API:** Query cluster state programmatically via the Ankra API
4. **Alerts:** Configure alerts to notify you when clusters go offline

***

## Troubleshooting Offline Clusters

If a cluster shows as **Offline**, check the following:

<Steps>
  <Step title="Verify Cluster Accessibility">
    Ensure the Kubernetes cluster is running and accessible. Try connecting with `kubectl` from your local machine.
  </Step>

  <Step title="Check Agent Status">
    Verify the Ankra Agent pod is running in your cluster:

    ```bash theme={null}
    kubectl get pods -n ankra-system
    ```
  </Step>

  <Step title="Check Agent Logs">
    Review agent logs for connection errors:

    ```bash theme={null}
    kubectl logs -n ankra-system -l app=ankra-agent
    ```
  </Step>

  <Step title="Verify Network Connectivity">
    Ensure the agent can reach the Ankra platform. Check firewall rules and network policies that might block outbound connections.
  </Step>

  <Step title="Upgrade Agent">
    If running an older agent version, upgrade to the latest:

    * Go to cluster settings in Ankra
    * Click **Upgrade Agent** if an update is available
  </Step>
</Steps>

***

## Agent Connection

The Ankra Agent maintains a persistent connection to the platform:

* **Heartbeat:** The agent sends regular heartbeats to confirm connectivity
* **Reconnection:** If connection is lost, the agent automatically attempts to reconnect
* **Graceful Handling:** Temporary network issues don't immediately mark the cluster offline

<Note>
  The agent uses outbound connections only, so no inbound firewall rules are required. It connects to `platform.ankra.app` on standard HTTPS ports.
</Note>

***

Still have questions? [Join our Slack community](https://join.slack.com/t/ankra-community/shared_invite/zt-3a5rem8f8-cUho4epX2MoLT83bFf~VSA) and we'll help out.
