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

# Storage

> Add persistent storage to your clusters so applications can store data that survives restarts and upgrades

<Frame>
  <img className="block dark:hidden" src="https://mintcdn.com/akua-1dce587a/NTgnQstkErDoAPAb/images/heros/storage-light.svg?fit=max&auto=format&n=NTgnQstkErDoAPAb&q=85&s=5f7076f8d6d0b391974c2137a11f48ab" alt="A pod that can restart uses a PersistentVolumeClaim, which a StorageClass binds to one of two providers: Local Path, a single node-local disk with no replica, or Piraeus, a volume replicated across two nodes. The persistent data survives pod restarts." width="1536" height="864" data-path="images/heros/storage-light.svg" />

  <img className="hidden dark:block" src="https://mintcdn.com/akua-1dce587a/NTgnQstkErDoAPAb/images/heros/storage-dark.svg?fit=max&auto=format&n=NTgnQstkErDoAPAb&q=85&s=7c6ed277c883e308b13bb1b3dab1fce3" alt="A pod that can restart uses a PersistentVolumeClaim, which a StorageClass binds to one of two providers: Local Path, a single node-local disk with no replica, or Piraeus, a volume replicated across two nodes. The persistent data survives pod restarts." width="1536" height="864" data-path="images/heros/storage-dark.svg" />
</Frame>

Most applications need to store data that persists beyond the lifetime of a single container: databases, file uploads, caches, and configuration. Kubernetes handles this through <Tooltip headline="Persistent Volumes" tip="Persistent Volumes (PVs) are storage resources in a Kubernetes cluster that exist independently of any individual pod. When a pod is deleted or restarted, the data on a persistent volume remains intact.">persistent volumes</Tooltip>, which provide storage that survives pod restarts, upgrades, and rescheduling.

Before your applications can use persistent storage, your cluster needs a <Tooltip headline="StorageClass" tip="A StorageClass defines what type of storage is available in your cluster and how volumes are provisioned. When an application requests storage, Kubernetes uses the StorageClass to automatically create the right kind of volume.">StorageClass</Tooltip> (a definition of what storage is available and how volumes are created). Akua provides two built-in storage providers you can deploy with one click, or you can use your own.

## Built-in storage providers

Akua includes two storage providers that cover development through production:

<CardGroup cols={2}>
  <Card title="Local Path Provisioner" icon="folder" href="/clusters/storage/local-path">
    Direct local disk storage with the lowest latency. Ideal for development, single-node setups, and databases that handle their own replication.
  </Card>

  <Card title="Piraeus (LINSTOR)" icon="database" href="/clusters/storage/piraeus">
    Replicated block storage across multiple nodes with synchronous or asynchronous replication. Automatic failover on node failure.
  </Card>
</CardGroup>

## Choosing a provider

The key question is: **who handles data replication, the storage layer or your application?**

|                        | Local Path Provisioner                 | Piraeus (LINSTOR)                                    |
| ---------------------- | -------------------------------------- | ---------------------------------------------------- |
| **Replication**        | None (your application must handle it) | Storage-level, across nodes                          |
| **Failover**           | Application-managed                    | Automatic (pods reschedule to a node with a replica) |
| **Volume size limits** | Not enforced (volumes are directories) | Enforced at the block device level                   |
| **Volume expansion**   | Not supported                          | Supported                                            |
| **Snapshots**          | No                                     | Yes                                                  |
| **Write latency**      | Lowest (direct to local disk)          | Depends on replication mode (sync or async)          |

<Tip>
  If your databases already replicate data across instances (like PostgreSQL streaming replication or MongoDB replica sets), Local Path Provisioner on NVMe SSDs gives you the best raw performance. If you want the storage layer to handle durability for you, use Piraeus.
</Tip>

## Deploy a storage provider

<Steps>
  <Step title="Open the storage tab">
    In your [cluster dashboard](https://akua.dev/clusters), select your cluster and navigate to the **Storage** tab.
  </Step>

  <Step title="Click deploy storage">
    If no storage provider is installed, you'll see an empty state with a **Deploy Storage** button. Click it to open the provider selection sheet.
  </Step>

  <Step title="Choose a provider">
    Select **Local Path Provisioner** for development or **Piraeus (LINSTOR)** for production. Each card shows the provider's features and trade-offs.
  </Step>

  <Step title="Deploy">
    Click **Deploy Storage**. The provider is deployed to your cluster as a standard application. A default StorageClass is created automatically, so your applications can request storage right away.
  </Step>
</Steps>

After deployment, the Storage tab shows your available StorageClasses with their provisioner, reclaim policy, and binding mode.

## Imported clusters

If you're using an [imported cluster](/clusters/import), you may already have storage configured by your cloud provider or infrastructure team:

* **Managed Kubernetes** (EKS, GKE, AKS): these typically come with a default StorageClass backed by cloud block storage (EBS, Persistent Disk, Azure Disk). Check your cluster's Storage tab to confirm.
* **Self-managed clusters**: you can deploy Akua's built-in providers, or use a <Tooltip headline="CSI Driver" tip="A Container Storage Interface (CSI) driver is a plugin that connects Kubernetes to a specific storage system. Cloud providers and storage vendors publish CSI drivers for their products.">CSI driver</Tooltip> from your infrastructure provider. For example, if your VMs run on Hetzner, consider the [Hetzner CSI driver](https://github.com/hetznercloud/csi-driver) to provision cloud volumes directly.

<Note>
  Akua's built-in providers work on any cluster, managed or imported. If your cloud provider already supplies storage, you don't need to deploy an additional provider unless you want different storage characteristics (like replication across nodes).
</Note>

## How applications use storage

When an application requests persistent storage through a <Tooltip headline="PersistentVolumeClaim" tip="A PersistentVolumeClaim (PVC) is a request for storage by an application. It specifies how much space is needed and what type of storage to use. Kubernetes matches the claim to an available volume or dynamically creates one.">PersistentVolumeClaim</Tooltip>, Kubernetes automatically provisions a volume using your cluster's default StorageClass. Your Package resources declare the storage they need, and the cluster handles the rest.

Common applications that require persistent storage:

* Databases (PostgreSQL, MySQL, Redis, MongoDB)
* File storage and media uploads
* Message queues (RabbitMQ, Kafka)
* Search engines (Elasticsearch, Meilisearch)

## Related topics

<CardGroup cols={2}>
  <Card title="Create a cluster" icon="plus" href="/clusters/create">
    Set up a managed cluster to deploy storage on.
  </Card>

  <Card title="Add workers" icon="server" href="/clusters/add-workers">
    Connect compute capacity to your cluster.
  </Card>

  <Card title="Import a cluster" icon="arrow-right-to-bracket" href="/clusters/import">
    Connect your existing Kubernetes cluster.
  </Card>

  <Card title="Clusters overview" icon="circle-info" href="/clusters">
    Understand how clusters work in Akua.
  </Card>
</CardGroup>
