安装helm chart stable / mssql-linux我得到了“pod has unbound PersistentVolumeClaims”

问题描述 投票:0回答:1

我使用默认安装(用于windows的docker上的kubernetes):

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

我可以看到持久量存在I can see that persistent volume exists

但是enter image description here


编辑:

kubectl描述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描述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描述存储类

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>
kubernetes kubernetes-helm docker-for-windows
1个回答
1
投票

我试图在Docker for Windows上使用Kubernetes进行这项工作,但我无法完成它。似乎Windows中的卷存在一些问题。我试过修补路径,但没有真正的效果。过了一段时间后,我注意到卷的大小有问题,所以我下载了图表并为PV添加了1 Gi,但后来我收到了关于路径损坏的错误。无论如何仍然不走运。因为我不是Windows的专家,这似乎是Windows或应用程序问题。我只能建议使用其他方式运行图表(我在ubuntu的Minikube上测试了它,GKE和由kubadm连接的计算引擎,图表就像没有任何其他配置的魅力)。

如果你想继续尝试尝试运行kubectl logs pod_name并按照那里描述的问题。

© www.soinside.com 2019 - 2024. All rights reserved.