Can I Use Azure Blob Storage for Kubernetes Persistent Storage in Hybrid Deployment?
Question
Can I use Azure Blob Storage for Kubernetes persistent storage in Hybrid Deployment?
Environment
Container platform: Kubernetes
Answer
Yes, you can use Azure Blob Storage as persistent storage for Kubernetes in Hybrid Deployment. To enable this, first ensure that your Azure Kubernetes Service (AKS) cluster has the Azure Blob CSI driver installed. For more information about the driver, see Azure documentation.
After enabling the driver, configure a Persistent Volume (PV) and a Persistent Volume Claim (PVC) that use the Azure Blob CSI driver.
You can then create a PVC that uses the Azure Blob Storage driver.
Example of Persistent Volume definition for using Azure Blob Storage:
apiVersion: v1 kind: PersistentVolume metadata: name: YOUR_PERSISTENT_VOLUME_NAME namespace: YOUR_NAMESPACE spec: capacity: storage: 40Gi accessModes: - ReadWriteMany persistentVolumeReclaimPolicy: Retain storageClassName: azureblob-csi csi: driver: blob.csi.azure.com volumeHandle: YOUR_STORAGE_ACCOUNT_NAME/YOUR_BLOB_CCONTAINER_NAME volumeAttributes: containerName: YOUR_BLOB_CCONTAINER_NAME nodeStageSecretRef: name: YOUR_SECRET namespace: YOUR_NAMESPACE
Example of Persistent Volume Claim definition for using Azure Blob Storage:
apiVersion: v1 kind: PersistentVolumeClaim metadata: name: YOUR_PERSISTENT_VOLUME_CLAIM_NAME namespace: YOUR_NAMESPACE spec: accessModes: - ReadWriteMany storageClassName: azureblob-csi volumeName: YOUR_PERSISTENT_VOLUME_NAME resources: requests: storage: 40Gi