Adding an SMB-based persistent storage
In Kubernetes deployments, workloads such as microservices or stateful services often need to share files or preserve data beyond the lifecycle of a pod. This could be for storing configuration files, sharing assets, or keeping logs accessible across multiple services. A shared network file system solves this need.
For environments using Windows File Server, the SMB (Server Message Block) protocol offers a reliable way to share files across systems on a network. Integrating SMB-based shared storage with Kubernetes allows multiple pods—running on different nodes—to access the same files, enabling:
- Shared configuration and assets across workloads
- Centralized storage for logs, reports, or generated artifacts
- Cross-platform interoperability with Windows systems
To connect a Kubernetes Cluster to SMB storage, the SMB CSI (Container Storage Interface) Driver is used. This driver allows Kubernetes to treat SMB shares as Persistent Volumes (PVs)—storage resources that exist independently of pods. The pods request access to these volumes through PersistentVolumeClaims (PVCs). When a pod using such a PVC starts, Kubernetes automatically mounts the SMB share, giving the pod seamless read/write access to the files stored there.
This document describes the process of configuring SMB-based shared storage in a Kubernetes Cluster using the SMB CSI Driver.
Implementation steps
![]() | The provided example YAML files can be applied without modification (other than updating username and password). For multiple environments (dev, qa, prod), use different StorageClasses, PVs, PVCs, volumeHandles, secret, and namespaces. |
-
Add and update the SMB Helm Repo by running the following two commands in the same order:
-
Install the SMB CSI Driver in the Kubernetes Cluster by running the install command as shown in the following example:

- smb-csi – Helm release name for this installation.
- smb/smb-csi-driver – Name of the chart from the Helm repo.
- kube-system – Namespace where the CSI driver must be installed.
-
Create a storageClass, for example, smb-storageClass.yaml, using the following definition:

Change smb-static-dev (storageClass name) to a unique name per environment (For example, smb-static-qa).
-
Create a Secret for SMB Credentials, for example, smb-secret.yaml, using the following definition:

- Change the name and namespace for the secret to match your environment. Ensure that they are unique across the cluster.
- Encode your SMB username and password in Base64, and replace the placeholder values in the secret.
-
Create a Persistent Volume (PV), for example, smb-pv.yaml, to access the Windows File Server SMB shares using the following definition.

- Change smb-static-pv-dev (PV name) and unique-smb-handle-dev (volumeHandle name) to unique names per environment.
- storageClassName must match the name, for example, smb-static-dev, defined for the storageClass you created.
- csi > volumeAtrributes > source must point to your SMB server path, for example, //hostname/AdeptiaShare.
- csi > nodeStageSecretRef > name must match the name, for example, smbcreds-dev, defined for the secret you created.
- csi > nodeStageSecretRef > namespace should match the namespace where the secret is created (for example, adeptia-dev).
-
Create a Persistent Volume Claim (PVC), for example, smb-pvc.yaml.

- Change smb-static-pvc (PVC name) to a unique name per environment.
- namespace should match the namespace, for example, adeptia-dev, where the secret is created.
- storageClassName must match the name, for example, smb-static-dev, defined for the storageClass you created.
-
Apply PV and PVC configurations by running the following two commands:
-
Open the Adeptia Connect application's global values.yaml file and configure the variables in the section additionalvolumeMounts as indicated below:

- Change smb-volume-dev (Volume Mount name) to a unique name per environment (for example, smb-volume-qa).
- Replace /mnt/AdeptiaShare with the actual path of the SMB share.
- claimName must match the name of the PVC you created, for example, smb-static-pvc-dev.
-
Run the install or upgrade command as shown below to bring the changes into effect:

- If you are performing a fresh installation of Adeptia Connect along with the configurations described in this document, run the install command.
- If Adeptia Connect is already deployed and you only need to configure SMB-based persistent storage, run the upgrade command. Before running the upgrade, make sure that all other configurations in the global values.yaml file are identical to those used during the initial deployment of the application.
Install:
Upgrade:
