Search code examples
azureopenshiftpersistent-storagepersistent-volumesazure-files

Persistent volumes for Azure Openshift cluster


I have an openshift 4.4 cluster hosted in Azure platform.

I have pods running as Deployments inside my cluster , now I need to make the container storage persistent to backup configurations inside those deployments.

I need to use Read/Write many mode for my requirement and I have 3 pods which needs to share the common persistant volume.

Currently I have admin access in Openshift console but didn't have any access in Azure directly.

I found that Azure file storage can serve my purpose but

I am not sure in how to achieve this persistent storage in Azure and openshift as I am new to both, can someone please guide me with any reference links or sample Yaml files to achieve this.

Thanks in Advance :)


Solution

  • You can follow the steps here:

    1. create a secret for the Azure Storage File Share;
    2. create a persistent volume with the secret;
    3. create a persistent volume claim for the persistent volume
    4. associate the persistent volume claim to the pod

    And for the Azure File StorageClass, you can see the example here.