Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Can';t连接azure磁盘,我收到如下错误。你能帮助我吗_Azure_Docker_Kubernetes - Fatal编程技术网

Can';t连接azure磁盘,我收到如下错误。你能帮助我吗

Can';t连接azure磁盘,我收到如下错误。你能帮助我吗,azure,docker,kubernetes,Azure,Docker,Kubernetes,无法连接azure磁盘,我遇到如下错误。你能帮我吗 卷“azure”的MountVolume.SetUp失败:装载失败:退出状态32装载命令:systemd运行装载参数:-description=Kubernetes/var/lib/kubelet/pods/ac5df2b0-46ea-4e30-af4d-7bcfe24b3598/volumes/Kubernetes.io~azure disk/azure--scope--mount-text4-o bind/var/lib/kubelet/p

无法连接azure磁盘,我遇到如下错误。你能帮我吗

卷“azure”的MountVolume.SetUp失败:装载失败:退出状态32装载命令:systemd运行装载参数:-description=Kubernetes/var/lib/kubelet/pods/ac5df2b0-46ea-4e30-af4d-7bcfe24b3598/volumes/Kubernetes.io~azure disk/azure--scope--mount-text4-o bind/var/lib/kubelet/plugins/Kubernetes.io/azure-disk/mounts/m3543918209/var/lib/kubelet/pods/ac5df2b0-46ea-4e30-af4d-7bcfe24b3598/volumes/kubernetes.io~azure disk/azure输出:以单元形式运行范围:run-r56fa40a4038c4c9f811455565645cb767.范围装载:/var/lib/kubelet/pods/ac5df2b0-46ea-4e30-af4d-7bcfe24b3598/volumes/kubernetes.io~azure disk/azure:特殊设备/var/lib/kubelet/plugins/kubernetes.io/azure-disk/mounts/m3543918209不存在

apiVersion: v1
kind: Service
metadata:
  name: mymongodb-service
spec:
 selector:
    app: mymongodb-pod
 ports:
    - port: 30207 
      targetPort: 27017
 type: LoadBalancer 
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: mymongodb-pod
  labels:
    app: mymongodb-pod
spec:
  replicas: 4
  selector:
    matchLabels:
      app: mymongodb-pod
  template:
    metadata:
      labels:
        app: mymongodb-pod
    spec:
      containers:
      - image: mongo
        name: mymongodb-container
        imagePullPolicy: Always
        env:
        - name: MONGO_INITDB_ROOT_USERNAME
          value: "admin"
        - name: MONGO_INITDB_ROOT_PASSWORD
          value: "pass123"
        ports:
        - containerPort: 27017
          name: mymongodb-pod
          protocol: TCP
        resources:
           limits:
            cpu: 250m
            memory: 256Mi
        volumeMounts:
        - name: azure
          mountPath: "/mnt/azure"
      securityContext:
        runAsUser: 0
        fsGroup: 0
      volumes:
      - name: azure
        azureDisk:
          kind: Managed
          diskName: ceycey
          diskURI: /subscriptions/0846a277-8c88-4e75-b258-ce5f16f6f805/resourcegroups/myresourcegroup/providers/microsoft.compute/disks/ceycey
          cachingMode: ReadWrite
          fsType: ext4
          readOnly: false

我建议您的应用改用Kubernetes PersistentVolume和PersistentVolumeClaim。谢谢您的评论我也会使用Kubernetes PersistentVolume和PersistentVolumeClaim,但这是问题所在吗?结果是我将只挂载一个磁盘。您使用AKS吗?库比德?哪个版本?我使用的是aks和minikube的最新版本