Error mounting azure vhd to kubernetes pod

10/26/2016

On kubernetes v1.4.3 I'm trying to mount the azure disk (vhd) to a pod using following configuration:

volumes:
- name: "data"
   azureDisk:
     diskURI: "https://testdevk8disks685.blob.core.windows.net/vhds/test-disk-01.vhd"
     diskName: "test-disk-01"

But it returns following error while creating pod

MountVolume.SetUp failed for volume "kubernetes.io/azure-disk/0a0e1c0f-9b7a-11e6-8cc5-000d3a32f480-data" (spec.Name: "data") pod "0a0e1c0f-9b7a-11e6-8cc5-000d3a32f480" (UID: "0a0e1c0f-9b7a-11e6-8cc5-000d3a32f480") with: mount failed: exit status 32
Mounting arguments: /var/lib/kubelet/plugins/kubernetes.io/azure-disk/mounts/falkonry-dev-k8-ampool-locator-01 /var/lib/kubelet/pods/0a0e1c0f-9b7a-11e6-8cc5-000d3a32f480/volumes/kubernetes.io~azure-disk/data  [bind]
Output: mount: special device /var/lib/kubelet/plugins/kubernetes.io/azure-disk/mounts/test-disk-01 does not exist
-- Phagun Baya
azure
kubernetes

1 Answer

1/12/2017

There was a bug in v1.4.3 which was the cause of this problem. The bug has been solved in v1.4.7+. Upgrading the kubernetes cluster to appropriate version solved the problem.

-- Phagun Baya
Source: StackOverflow