简体   繁体   中英

Can you mount a NetApp volume on a AKS Kubernetes Cluster from a different region?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM