我的Jenkins X安装(项目中期)现在变得非常不稳定。 (主要是)由于磁盘压力,Jenkins pods 无法启动。
通常,许多 pod 都失败了
The node was low on resource: [DiskPressure].
要么
0/4 nodes are available: 1 Insufficient cpu, 1 node(s) had disk pressure, 2 node(s) had no available volume zone. Unable to mount volumes for pod "jenkins-x-chartmuseum-blah": timeout expired waiting for volumes to attach or mount for pod "jx"/"jenkins-x-chartmuseum-blah". list of unmounted volumes=[storage-volume]. list of unattached volumes=[storage-volume default-token-blah] Multi-Attach error for volume "pvc-blah" Volume is already exclusively attached to one node and can't be attached to another
对于具有npm的项目及其生成的大量
node-modules
目录,使用更多的预览版本可能会变得更加明显。我也不确定 Jenkins 是否会自己清理。重新引导节点会有所帮助,但不会持续很长时间。
最佳答案
让我们从Kubernetes方面解决这个问题。
您可以采取以下措施来解决此问题:
kubeclt logs: kube-scheduler events logs
journalctl -u kubelet: kubelet logs
/var/log/kube-scheduler.log
有关以下原因的更多信息。
kubectl get hpa
您可以使用标准的kubectl命令来设置和manage your HPA. 我没有亲自测试它,因为需要更多信息才能重现整个场景,但是我希望以上建议会有用。
请让我知道是否有帮助。
关于kubernetes - Jenkins X构建失败,出现 “The node was low on resource: [DiskPressure].”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56174205/