installing helm chart stable/mssql-linux I got "pod has unbound PersistentVolumeClaims"

3/6/2019

I used the default installation (kubernetes on docker for windows):

helm install --name mymssql stable/mssql-linux --set acceptEula.value=Y --set edition.value=Developer

I can see that persistent volume exists I can see that persistent volume exists

but enter image description here


edit:

kubectl describe pvc

Name:          mymssql-mssql-linux-backup
Namespace:     default
StorageClass:  hostpath
Status:        Bound
Volume:        pvc-0a556593-3fa4-11e9-a695-00155dd56102
Labels:        app=mymssql-mssql-linux
               chart=mssql-linux-0.7.0
               heritage=Tiller
               release=mymssql
Annotations:   control-plane.alpha.kubernetes.io/leader={"holderIdentity":"b34171f9-3f99-11e9-b4b6-f496341cc924","leaseDurationSeconds":15,"acquireTime":"2019-03-06T00:08:59Z","renewTime":"2019-03-06T00:09:01Z","lea...
               pv.kubernetes.io/bind-completed=yes
               pv.kubernetes.io/bound-by-controller=yes
               volume.beta.kubernetes.io/storage-provisioner=docker.io/hostpath
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      1Gi
Access Modes:  RWO
Events:
  Type    Reason                 Age                From                                                                     Message
  ----    ------                 ----               ----                                                                     -------
  Normal  ExternalProvisioning   24m (x3 over 24m)  persistentvolume-controller                                              waiting for a volume to be created, either by external provisioner "docker.io/hostpath" or manually created by system administrator
  Normal  Provisioning           24m                docker.io/hostpath DESKTOP-BH16SJ1 b34171f9-3f99-11e9-b4b6-f496341cc924  External provisioner is provisioning volume for claim "default/mymssql-mssql-linux-backup"
  Normal  ProvisioningSucceeded  24m                docker.io/hostpath DESKTOP-BH16SJ1 b34171f9-3f99-11e9-b4b6-f496341cc924  Successfully provisioned volume pvc-0a556593-3fa4-11e9-a695-00155dd56102


Name:          mymssql-mssql-linux-data
Namespace:     default
StorageClass:  hostpath
Status:        Bound
Volume:        pvc-0a56634b-3fa4-11e9-a695-00155dd56102
Labels:        app=mymssql-mssql-linux
               chart=mssql-linux-0.7.0
               heritage=Tiller
               release=mymssql
Annotations:   control-plane.alpha.kubernetes.io/leader={"holderIdentity":"b34171f9-3f99-11e9-b4b6-f496341cc924","leaseDurationSeconds":15,"acquireTime":"2019-03-06T00:08:59Z","renewTime":"2019-03-06T00:09:02Z","lea...
               pv.kubernetes.io/bind-completed=yes
               pv.kubernetes.io/bound-by-controller=yes
               volume.beta.kubernetes.io/storage-provisioner=docker.io/hostpath
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      1Gi
Access Modes:  RWO
Events:
  Type    Reason                 Age                From                                                                     Message
  ----    ------                 ----               ----                                                                     -------
  Normal  ExternalProvisioning   24m (x3 over 24m)  persistentvolume-controller                                              waiting for a volume to be created, either by external provisioner "docker.io/hostpath" or manually created by system administrator
  Normal  Provisioning           24m                docker.io/hostpath DESKTOP-BH16SJ1 b34171f9-3f99-11e9-b4b6-f496341cc924  External provisioner is provisioning volume for claim "default/mymssql-mssql-linux-data"
  Normal  ProvisioningSucceeded  24m                docker.io/hostpath DESKTOP-BH16SJ1 b34171f9-3f99-11e9-b4b6-f496341cc924  Successfully provisioned volume pvc-0a56634b-3fa4-11e9-a695-00155dd56102


Name:          mymssql-mssql-linux-master
Namespace:     default
StorageClass:  hostpath
Status:        Bound
Volume:        pvc-0a574f80-3fa4-11e9-a695-00155dd56102
Labels:        app=mymssql-mssql-linux
               chart=mssql-linux-0.7.0
               heritage=Tiller
               release=mymssql
Annotations:   control-plane.alpha.kubernetes.io/leader={"holderIdentity":"b34171f9-3f99-11e9-b4b6-f496341cc924","leaseDurationSeconds":15,"acquireTime":"2019-03-06T00:08:59Z","renewTime":"2019-03-06T00:09:02Z","lea...
               pv.kubernetes.io/bind-completed=yes
               pv.kubernetes.io/bound-by-controller=yes
               volume.beta.kubernetes.io/storage-provisioner=docker.io/hostpath
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      1Gi
Access Modes:  RWO
Events:
  Type    Reason                 Age                From                                                                     Message
  ----    ------                 ----               ----                                                                     -------
  Normal  ExternalProvisioning   24m (x4 over 24m)  persistentvolume-controller                                              waiting for a volume to be created, either by external provisioner "docker.io/hostpath" or manually created by system administrator
  Normal  Provisioning           24m                docker.io/hostpath DESKTOP-BH16SJ1 b34171f9-3f99-11e9-b4b6-f496341cc924  External provisioner is provisioning volume for claim "default/mymssql-mssql-linux-master"
  Normal  ProvisioningSucceeded  24m                docker.io/hostpath DESKTOP-BH16SJ1 b34171f9-3f99-11e9-b4b6-f496341cc924  Successfully provisioned volume pvc-0a574f80-3fa4-11e9-a695-00155dd56102


Name:          mymssql-mssql-linux-translog
Namespace:     default
StorageClass:  hostpath
Status:        Bound
Volume:        pvc-0a587716-3fa4-11e9-a695-00155dd56102
Labels:        app=mymssql-mssql-linux
               chart=mssql-linux-0.7.0
               heritage=Tiller
               release=mymssql
Annotations:   control-plane.alpha.kubernetes.io/leader={"holderIdentity":"b34171f9-3f99-11e9-b4b6-f496341cc924","leaseDurationSeconds":15,"acquireTime":"2019-03-06T00:08:59Z","renewTime":"2019-03-06T00:09:02Z","lea...
               pv.kubernetes.io/bind-completed=yes
               pv.kubernetes.io/bound-by-controller=yes
               volume.beta.kubernetes.io/storage-provisioner=docker.io/hostpath
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      1Gi
Access Modes:  RWO
Events:
  Type    Reason                 Age                From                                                                     Message
  ----    ------                 ----               ----                                                                     -------
  Normal  ExternalProvisioning   24m (x4 over 24m)  persistentvolume-controller                                              waiting for a volume to be created, either by external provisioner "docker.io/hostpath" or manually created by system administrator
  Normal  Provisioning           24m                docker.io/hostpath DESKTOP-BH16SJ1 b34171f9-3f99-11e9-b4b6-f496341cc924  External provisioner is provisioning volume for claim "default/mymssql-mssql-linux-translog"
  Normal  ProvisioningSucceeded  24m                docker.io/hostpath DESKTOP-BH16SJ1 b34171f9-3f99-11e9-b4b6-f496341cc924  Successfully provisioned volume pvc-0a587716-3fa4-11e9-a695-00155dd56102

kubectl describe pv:

Name:            pvc-0a556593-3fa4-11e9-a695-00155dd56102
Labels:          <none>
Annotations:     pv.kubernetes.io/provisioned-by=docker.io/hostpath
Finalizers:      [kubernetes.io/pv-protection]
StorageClass:    hostpath
Status:          Bound
Claim:           default/mymssql-mssql-linux-backup
Reclaim Policy:  Delete
Access Modes:    RWO
Capacity:        1Gi
Node Affinity:   <none>
Message:
Source:
    Type:          HostPath (bare host directory volume)
    Path:          /host_mnt/c/Users/User/.docker/Volumes/mymssql-mssql-linux-backup/pvc-0a556593-3fa4-11e9-a695-00155dd56102
    HostPathType:
Events:            <none>


Name:            pvc-0a56634b-3fa4-11e9-a695-00155dd56102
Labels:          <none>
Annotations:     pv.kubernetes.io/provisioned-by=docker.io/hostpath
Finalizers:      [kubernetes.io/pv-protection]
StorageClass:    hostpath
Status:          Bound
Claim:           default/mymssql-mssql-linux-data
Reclaim Policy:  Delete
Access Modes:    RWO
Capacity:        1Gi
Node Affinity:   <none>
Message:
Source:
    Type:          HostPath (bare host directory volume)
    Path:          /host_mnt/c/Users/User/.docker/Volumes/mymssql-mssql-linux-data/pvc-0a56634b-3fa4-11e9-a695-00155dd56102
    HostPathType:
Events:            <none>


Name:            pvc-0a574f80-3fa4-11e9-a695-00155dd56102
Labels:          <none>
Annotations:     pv.kubernetes.io/provisioned-by=docker.io/hostpath
Finalizers:      [kubernetes.io/pv-protection]
StorageClass:    hostpath
Status:          Bound
Claim:           default/mymssql-mssql-linux-master
Reclaim Policy:  Delete
Access Modes:    RWO
Capacity:        1Gi
Node Affinity:   <none>
Message:
Source:
    Type:          HostPath (bare host directory volume)
    Path:          /host_mnt/c/Users/User/.docker/Volumes/mymssql-mssql-linux-master/pvc-0a574f80-3fa4-11e9-a695-00155dd56102
    HostPathType:
Events:            <none>


Name:            pvc-0a587716-3fa4-11e9-a695-00155dd56102
Labels:          <none>
Annotations:     pv.kubernetes.io/provisioned-by=docker.io/hostpath
Finalizers:      [kubernetes.io/pv-protection]
StorageClass:    hostpath
Status:          Bound
Claim:           default/mymssql-mssql-linux-translog
Reclaim Policy:  Delete
Access Modes:    RWO
Capacity:        1Gi
Node Affinity:   <none>
Message:
Source:
    Type:          HostPath (bare host directory volume)
    Path:          /host_mnt/c/Users/User/.docker/Volumes/mymssql-mssql-linux-translog/pvc-0a587716-3fa4-11e9-a695-00155dd56102
    HostPathType:
Events:            <none>

kubectl describe storageclass

Name:                  hostpath
IsDefaultClass:        Yes
Annotations:           storageclass.kubernetes.io/is-default-class=true
Provisioner:           docker.io/hostpath
Parameters:            <none>
AllowVolumeExpansion:  <unset>
MountOptions:          <none>
ReclaimPolicy:         Delete
VolumeBindingMode:     Immediate
Events:                <none>
-- arielorvits
docker
docker-for-windows
kubernetes
kubernetes-helm

2 Answers

1/30/2020

I had the same issue and came accross an article that explains that the issue is caused because the directory from Windows is mounted as Common Internet File System (CIFS) inside the Docker container. CIFS is not officially supported as a file system by SQL Server on Linux.

https://support.microsoft.com/en-us/help/4212960/fix-sql-server-2017-won-t-start-with-linux-container-image-on-docker

I resolved it by using a newer version of sql server for linux

helm install mymssql stable/mssql-linux --set acceptEula.value=Y --set edition.value=Developer --set service.type=LoadBalancer --set image.repository=mcr.microsoft.com/mssql/server --set image.tag=2019-latest
-- roh85
Source: StackOverflow

3/29/2019

I have tried to make this work on Kubernetes on Docker for Windows and I was not able to complete it. Seems like there is some problem with Volumes in Windows. I have tried tinkering with the paths but with no real effect. After some time I noticed that there is a problem with the size of the volumes, so I downloaded the chart and added 1 Gi to PV's but then I got an error about broken paths. Anyway still unlucky. As I am no expert in Windows and this seems like either Windows or application problem. I can only advise to use other way of running the chart (I tested it on Minikube on ubuntu, GKE and compute engine connected by kubadm and the chart works like a charm without any additional configuration).

If you want to keep trying try running kubectl logs pod_name and follow the problems described there.

-- aurelius
Source: StackOverflow