0

I am creating a egress-operator. I have a pod egress-operator-controller-manager created from makefile by command make deploy IMG=my_azure_repo/egress-operator:v0.1. The pod is failing , its showing error in pod description as:

  State:          Waiting
  Reason:       RunContainerError
  Last State:     Terminated
  Reason:       StartError
  Message:      failed to create containerd task: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/manager": stat /manager: no such file or directory: unknown
  Failed     44s (x3 over 59s)  kubelet  Error: failed to create containerd task: 
  OCI runtime create failed: container_linux.go:380: starting container process caused: 
  exec: "/manager": stat /manager: no such file or directory: unknown

I suspect that in manager.yaml, under command: /manager is executed.
Can someone let me know what is going wrong in this manager.yaml and whether /manager is valid under command: in deployment.yaml

Debugging UPDATE
Instead of running Dockerfile, now I just build and run image_azure_repo/egress-operator:v0.1 locally (on same ubuntu 18 VM), When I try to login with: docker exec -it <container_id> /bin/bash, I am getting error :

OCI runtime exec failed: exec failed: container_linux.go:380: 
starting container process caused: exec: "/bin/bash": stat /bin/bash: 
no such file or directory: unknown

This is similar error what I see in pod description. Instead of /bin/bash , I also tried docker exec with /bin/sh and only sh ; Its giving same error

4

2 回答 2

1

这应该与 libc 不匹配。

Golang 默认使用 glibc,而 alpine 使用 musl。

你可以尝试那些来修复它:

  1. 使用 glibc 使用基础镜像
  2. 在你的 alpine 镜像中安装 glibc
于 2021-07-14T11:34:23.427 回答
1
  • 在 Dockerfile 中,您提到的入口点是ENTRYPOINT ["/manager"]但不应该是ENTRYPOINT ["./manager"]

  • 关于“启动容器进程导致:exec:”/bin/bash“:stat /bin/bash:”,似乎基本映像没有/bin/bash它可能只是/bin/sh

于 2021-07-13T15:55:03.297 回答