Bug 1
问题描述
standard_init_linux.go:178: exec user process caused “exec format error”
解决方法
在 entry_point.sh 文件中的头部加上 #!/bin/bash 就好
Bug 2
问题描述
创建Pod失败,并且通过 kubectl describe
查看错误信息:
Kubernetes Pod fails with CrashLoopBackOff
解决方法
The issue caused by the docker container which exits as soon as the “start” process finishes. i added a command that runs forever and it worked. This issue mentioned here
就是Pod刚一创建就结束了,可以检查dockerfile是否正确书写. 然后建议通过 kubectl logs
和 kubectl describe pod
等命令来做 troubleshooting
我犯的错误就是没有弄清楚 ENTRYPOINT
和 CMD
的区别和用法,如果想要让在容器被创建之前执行Entrypoint的内容,然后再执行CMD的内容,需要在Entrypoint的结尾加上
exec "$@"
具体可参考博客:blog.51cto.com/8869176/2082584
以OperationTrident的后台程序为例,dockerfile:
FROM mono
MAINTAINER