[root@spray2:~]# kubectl logs -f client-go-in-cluster-demo
standard_init_linux.go:211: exec user process caused "no such file or directory"
.
非常簡單的Dockerfile
[root@omp-harbor:/data/Dockerfile/k8stest]# vim Dockerfile
FROM alpine:3.12.3
COPY ./app /app
CMD ["/app"]
搞了半天,其實是alpine鏡像的問題:
https://stackoverflow.com/a/62123648
export CGO_ENABLED=0
Then go build