我正在尝试sonatype/nexus3
在 openshift online v3 pro 上运行。如果我只是使用 Web 控制台从图像创建一个新应用程序,它只会分配 512Mi 并且它会因 OOM 而死。它确实被创建了,并在它因内存不足而死之前记录了很多 java 输出。使用 Web 控制台时,似乎没有办法在图像上设置内存。当我尝试编辑 pod 的 yaml 时,它不允许我编辑内存限制。
阅读有关内存限制的文档表明我可以使用以下方法运行:
oc run nexus333 --image=sonatype/nexus3 --limits=memory=750Mi
然后它甚至没有开始。它死于:
{kubelet ip-172-31-59-148.ec2.internal} Error: Error response from daemon: {"message":"create c30deb38b3c26252bf1218cc898fbf1c68d8fc14e840076710c211d58ed87a59: mkdir /var/lib/docker/volumes/c30deb38b3c26252bf1218cc898fbf1c68d8fc14e840076710c211d58ed87a59: permission denied"}
更多信息来自oc get events
:
FIRSTSEEN LASTSEEN COUNT NAME KIND SUBOBJECT TYPE REASON SOURCE MESSAGE
16m 16m 1 nexus333-1-deploy Pod Normal Scheduled {default-scheduler } Successfully assigned nexus333-1-deploy to ip-172-31-50-97.ec2.internal
16m 16m 1 nexus333-1-deploy Pod spec.containers{deployment} Normal Pulling {kubelet ip-172-31-50-97.ec2.internal} pulling image "registry.reg-aws.openshift.com:443/openshift3/ose-deployer:v3.6.173.0.21"
16m 16m 1 nexus333-1-deploy Pod spec.containers{deployment} Normal Pulled {kubelet ip-172-31-50-97.ec2.internal} Successfully pulled image "registry.reg-aws.openshift.com:443/openshift3/ose-deployer:v3.6.173.0.21"
15m 15m 1 nexus333-1-deploy Pod spec.containers{deployment} Normal Created {kubelet ip-172-31-50-97.ec2.internal} Created container
15m 15m 1 nexus333-1-deploy Pod spec.containers{deployment} Normal Started {kubelet ip-172-31-50-97.ec2.internal} Started container
15m 15m 1 nexus333-1-rftvd Pod Normal Scheduled {default-scheduler } Successfully assigned nexus333-1-rftvd to ip-172-31-59-148.ec2.internal
15m 14m 7 nexus333-1-rftvd Pod spec.containers{nexus333} Normal Pulling {kubelet ip-172-31-59-148.ec2.internal} pulling image "sonatype/nexus3"
15m 10m 19 nexus333-1-rftvd Pod spec.containers{nexus333} Normal Pulled {kubelet ip-172-31-59-148.ec2.internal} Successfully pulled image "sonatype/nexus3"
15m 15m 1 nexus333-1-rftvd Pod spec.containers{nexus333} Warning Failed {kubelet ip-172-31-59-148.ec2.internal} Error: Error response from daemon: {"message":"create 3aa35201bdf81d09ef4b09bba1fc843b97d0339acfef0c30cecaa1fbb6207321: mkdir /var/lib/docker/volumes/3aa35201bdf81d09ef4b09bba1fc843b97d0339acfef0c30cecaa1fbb6207321: permission denied"}
我不知道为什么如果我使用 web 控制台我不能分配更多的内存。我不确定为什么oc run
用 mkdir 错误运行它会死掉。谁能告诉我如何sonatype/nexus3
在 openshift online pro 上运行?