Documentation Index

Fetch the complete documentation index at: https://docs.dataloop.ai/llms.txt

Use this file to discover all available pages before exploring further.

Host Path

Prev Next

What is Host Path?

Host Path mounts a local file or directory from a Kubernetes node into a container. In this case, the storage is physically located on the machine where the pod is running.

How Host Path Works

A Host Path storage driver allows DDOE to access files that are stored directly on the local filesystem of a Kubernetes node. Unlike NFS or S3, the data is not stored on a shared server or object storage system. Instead, it resides on the physical or virtual machine where the compute cluster is running.

Local Storage on Kubernetes Node → Host Path Volume → Compute Cluster Pod → Storage Driver → Dataset

  1. Step 1: Files are Stored on the Kubernetes Node:

    1. Files are physically stored on the machine.

    2. No external storage server is required.

    3. The node's operating system manages the files.

  2. Step 2: Kubernetes Mounts the Host Path: A Host Path volume is configured to expose the local directory to containers running in the cluster. The application sees the files as if they are stored inside the container, even though they remain on the host machine.

  3. Step 3: The Storage Driver Exposes the Mounted Path: The DDOE Storage Driver connects the mounted directory to the platform. The Storage Driver tells DDOE:

    1. Which directory contains the files

    2. How to access them

    3. Which datasets should use this storage

  4. Step 4: Create a Dataset Using the Storage Driver: A dataset can now be created using the configured storage driver. The dataset becomes linked directly to the local filesystem.

  5. Step 5: Access Files Through the Dataset:

When users browse the dataset:

Dataset
   ↓
FS Driver
   ↓
/mnt/data
   ↓
Local Files

For example:

image1.jpg

is retrieved from:

/data/images/image1.jpg

No file upload or synchronization is required.

Example Configuration

{
  "name": "fs-storage",
  "type": "fs",
  "config": {
    "path": "/data/files",
    "mountPath": "/data/files"
  }
}

Volume definition:

{
  "name": "fs-storage",
  "mountPath": "/data/files",
  "hostPath": {
    "path": "/data/files",
    "type": "Directory"
  }
}

Advantages

  • Very Fast: No network usage. Storage access is local.

  • Simple Setup: No storage server required.

  • Good for Development: Easy to configure.

Limitations

  • Not Shared: Data only exists on a specific Kubernetes node.

  • Risk During Pod Migration: If a pod moves to another node: Node A → Node B the data might not be available.

  • Not Ideal for Large Clusters: Storage is tied to the local machine.

When Should You Use Host Path?

Use Host Path when:

  • The data already exists on the compute node.

  • You have a single-node or small cluster deployment.

  • You need the fastest possible access to local files.

  • You are running on-premises development or testing environments.

Avoid Host Path when:

  • Multiple nodes must access the same data.

  • Pods frequently move between nodes.

  • You require highly available shared storage.

Create an On-Premises Host Path Integration

Prerequisites

  • Roles and Permissions: Only users with the Organization Admin or Owner roles are authorized to create integrations. Learn more

  • Path: The directory location on host.

  • Type: The type of host path mount.

  1. Log in to the DDOE platform.

  2. From the left-side panel, select Integrations.

  3. Click Create Integration -> Create Storage Integration. A pop-up window is displayed on the right-side.

  4. In Integration Name, enter a name for the Host Path integration.

  5. From the Provider dropdown, select On-Prem.

  6. From the Integration Type dropdown, select Host Path.

  7. In Path, enter the directory path on the host machine that you want to expose to the compute cluster.

  8. In Type, select the host path mount type:

    • Directory – The specified directory must already exist on the host.

    • DirectoryOrCreate – Creates the directory automatically if it does not already exist.

  9. Enable Read Only if the mounted path should be accessible for viewing only and should not allow modifications.

  10. Click Create Integration. The Host Path type integration will be created and listed in the Integration page.