I am using Azure NetApp Files and AKS. Let's say I have a NetApp account together with a NetApp pool on one region, and I want to mount a volume on a pod in a k8s cluster that is in another region. Would that be possible? So far I have been getting an error saying that the pod was unable to mount the volume and it timed out.
Unable to mount volumes for pod "x": timeout expired waiting for volumes to attach or mount for pod "x"
My PersistentVolume and PersistentVolumeClaim yaml files look like this:
apiVersion: v1
kind: PersistentVolume
metadata:
name: test
finalizers : null
labels:
type: nfs
spec:
capacity:
storage: 200Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
nfs:
server: 1.2.3.4
path: /test-volume
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: test
namespace: myNamespace
finalizers: null
spec:
accessModes:
- ReadWriteMany
storageClassName: ""
resources:
requests:
storage: 200Gi
selector:
matchLabels:
type: nfs
Unfortunately, I'm afraid you cannot achieve it. In the limitation of the Azure NetApp file for AKS, it says here:
Azure NetApp Files service must be created in the same virtual network as your AKS cluster.
You know, the virtual network for the AKS should be in the same region with AKS, then it can be available. So you cannot mount the Azure NetApp file in a different region to AKS.