Skip to content

Use Persistent Storage with Your Container

If you want to store or share files between containers, you can mount a persistent volume to your container. This guide walks you through the steps to create and attach a volume.


Prerequisites

  • You have an existing Namespace.
  • You have access to the Nexaa portal.

Steps to Use Persistent Storage

1. Create a Persistent Volume

  1. Open your Namespace in the Nexaa portal.
  2. Navigate to the Volumes tab.
  3. Click "Add Volume".
  4. Enter a name for your volume.
  5. Specify the amount of storage you need.
  6. Click "Add Volume".

You now have a volume available that can be mounted to a container.


2. Mount the Volume to a Container

  1. Open the Containers tab in your Namespace.
  2. Click "Add Container".
  3. In the form, scroll to the Persistent Storage section.
  4. Enable the option to use persistent storage.
  5. Choose "Mount Existing Volume".
  6. Select the volume you created earlier.
  7. Specify the mount path inside the container (e.g., /my/volume/path).
  8. Click "Mount" and complete the container configuration.

Once the container is running, the specified path will be backed by persistent storage.


Example Configuration

To quickly test persistent storage, you can use the following setup:

  • Image: erwinmaastilaa/fileexplorer:v0.1
  • Credentials: public
  • Container name: volume-test
  • Resources: 0.25 CPU and 0.5 GB RAM
  • Environment Variables: leave empty
  • Expose port: 5000
  • Make available on the internet: Yes
  • Ingress: HTTP on port 5000
  • Mount Path: /my/volume/path

This configuration will allow you to browse the file system within your mounted volume via a simple web interface.


Result

After the container starts and becomes available, the specified mount path inside the container will persist any data stored there. The data remains available even after restarts or updates, and only disappears when the volume itself is deleted.