> ## 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-0b861dc6/7KPav8EV2jXc1gHe/images/heros/storage-light.svg?fit=max&auto=format&n=7KPav8EV2jXc1gHe&q=85&s=99c9593bd2a9f2b4119131714f1d6bc3" 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-0b861dc6/7KPav8EV2jXc1gHe/images/heros/storage-dark.svg?fit=max&auto=format&n=7KPav8EV2jXc1gHe&q=85&s=5ffce5446d448a4ceff095d4e1307292" 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). Managed clusters get one when they are created, so a PersistentVolumeClaim binds without any setup. You can add a second provider, or bring your own.

## What a managed cluster starts with

Every managed cluster is created with [Local Path Provisioner](/clusters/storage/local-path) installed and its `local-path` StorageClass marked as the cluster default. An application that requests storage without naming a class gets a volume on the worker node its pod runs on.

That default covers development and any workload that replicates its own data. It replicates nothing itself, so a workload whose durability must survive losing a node needs a replicated provider instead.

## 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 an additional 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">
    Click **Deploy Storage** to open the provider selection sheet.
  </Step>

  <Step title="Choose a provider">
    Select **Piraeus (LINSTOR)**. The 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, and its StorageClasses appear in the Storage tab once it is running.
  </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. Akua does not add a default class to an imported cluster, because a second default would silently change where existing claims land.
* **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>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.