简体   繁体   English

Kubernetes - 所有 PVC 已绑定,但“pod 具有未绑定的即时 PersistentVolumeClaims”

[英]Kubernetes - All PVCs Bound, yet "pod has unbound immediate PersistentVolumeClaims"

Unfortunately I am unable to paste configs or kubectl output, but please bear with me.不幸的是,我无法粘贴配置或kubectl output,但请多多包涵。

Using helm to deploy a series of containers to K8s 1.14.6, all containers are deploying successfully except for those that have initContainer sections defined within them.使用 helm 将一系列容器部署到initContainer 1.14.6,所有容器都部署成功,除了那些在其中定义了 initContainer 部分的容器。

In these failing deployments, their templates define container and initContainer stanzas that reference the same persistent-volume (and associated persistent-volume-claim , both defined elsewhere).在这些失败的部署中,它们的模板定义了containerinitContainer节,它们引用了相同的persistent-volume (以及相关persistent-volume-claim ,两者都在别处定义)。

The purpose of the initContainer is to copy persisted files from a mounted drive location into the appropriate place before the main container is established. initContainer的目的是在建立主container之前将持久文件从已安装的驱动器位置复制到适当的位置。

Other containers (without initContainer stanzas) mount properly and run as expected.其他容器(没有initContainer节)正确安装并按预期运行。

These pods which have initContainer stanzas, however, report "failed to initialize" or "CrashLoopBackOff" as they continually try to start up.但是,这些具有initContainer节的 pod 在不断尝试启动时会报告“初始化失败”或“CrashLoopBackOff”。 The kubectl describe pod of these pods gives only a Warning in the events section that "pod has unbound immediate PersistentVolumeClaims."这些 pod 的kubectl describe pod仅在事件部分给出“pod has unbound immediate PersistentVolumeClaims”的警告。 The initContainer section of the pod description says it has failed because "Error" with no further elaboration. pod 描述的initContainer部分表示它已失败,因为“错误”没有进一步说明。

When looking at the associated pv and pvc entries from kubectl , however, none are left pending, and all report "Bound" with no Events to speak of in the description.但是,当查看来自kubectl的相关pvpvc条目时,没有一个条目处于待处理状态,并且所有条目都报告“已绑定”且描述中没有可提及的事件。

I have been able to find plenty of articles suggesting fixes when your pvc list shows Pending claims, yet none so far that address this particular set of circumstance when all pvc s are bound.当您的pvc列表显示 Pending 声明时,我已经能够找到大量建议修复的文章,但到目前为止,还没有一篇文章能够解决所有pvc都绑定时的这种特定情况。

When a PVC is "Bound", this means that you do have a PersistentVolume object in your cluster, whose claimRef refers to that PVC (and usually: that your storage provisioner is done creating the corresponding volume in your storage backend).当 PVC 被“绑定”时,这意味着您的集群中确实有一个 PersistentVolume object,其 claimRef 指的是该 PVC(通常:您的存储配置器已在您的存储后端创建相应的卷)。

When a volume is "not bound", in one of your Pod, this means the node where your Pod was scheduled is unable to attach your persistent volume.当一个卷“未绑定”时,在您的一个 Pod 中,这意味着您的 Pod 所在的节点无法附加您的持久卷。 You should then check logs for your csi volumes attacher pod, when using CSI, or directly in nodes logs when using some in-tree driver.然后,您应该在使用 CSI 时检查您的 csi 卷连接器 pod 的日志,或者在使用某些树内驱动程序时直接在节点日志中检查日志。

While the crashLoopBackOff think is something else.而 crashLoopBackOff 认为是另一回事。 You should check for logs of your initContainer: kubectl logs -c <init-container-name> -p .您应该检查您的 initContainer 的日志: kubectl logs -c <init-container-name> -p From your explanation, I would suppose there's some permission issues when copying files over.根据您的解释,我认为复制文件时存在一些权限问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 2 pod 具有未绑定的即时 PersistentVolumeClaims - Kubernetes - 2 pod has unbound immediate PersistentVolumeClaims - Kubernetes Kubernetes - pod 具有未绑定的即时 PersistentVolumeClaims - Kubernetes - pod has unbound immediate PersistentVolumeClaims Pod 具有未绑定的立即 PersistentVolumeClaims - Pod has unbound immediate PersistentVolumeClaims pod 有未绑定的即时 PersistentVolumeClaims ECK(Kubernetes 上的 Elasticsearch) - pod has unbound immediate PersistentVolumeClaims ECK (Elasticsearch on Kubernetes) pod具有未绑定的立即PersistentVolumeClaims kubernetes nfs卷 - pod has unbound immediate PersistentVolumeClaims kubernetes nfs volume Kubernetes、Elasticsearch:0/3 个节点可用:3 个 pod 具有未绑定的即时 PersistentVolumeClaims - Kubernetes, Elasticsearch: 0/3 nodes are available: 3 pod has unbound immediate PersistentVolumeClaims 带副本的 Statefulset:1 个 pod 具有未绑定的即时 PersistentVolumeClaims - Statefulset with replicas : 1 pod has unbound immediate PersistentVolumeClaims pod 具有未绑定的直接 PersistentVolumeClaims 操作管理器 - pod has unbound immediate PersistentVolumeClaims ops manager DigitalOcean pod具有未绑定的直接PersistentVolumeClaims - DigitalOcean pod has unbound immediate PersistentVolumeClaims RabbitMQ 安装 - pod 具有未绑定的即时 PersistentVolumeClaims - RabbitMQ Install - pod has unbound immediate PersistentVolumeClaims
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM