You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While debugging some transient DNS issues in a cluster today, I noticed the following error in the cluster event logs:
Exec lifecycle hook ([/usr/bin/sleep 15]) for Container "coredns" in Pod "coredns-coredns-8dbff79d6-kkp8n_kube-system(662883c5-3b59-46d5-9785-cb4146cdf3a6)" failed - error: rpc error: code = Unknown desc = failed to exec in container: failed to start exec "a6bf72f3d8f69ed29f82c49d1d2b3f1431ef56bd95de14bef845556fcfcfa93b": OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "/usr/bin/sleep": stat /usr/bin/sleep: no such file or directory: unknown, message: ""
I believe this change to the coredns base image led to the preStop lifecycle hook to no longer function correctly: coredns/coredns@a77d983 . Since /usr/bin/sleep doesn't exist, the coredns pod is terminated immediately instead of respecting the preStopSleep value.
I worked around this issue by building my own coredns image that had /usr/bin/sleep. Not sure the best way to fix this given the empty base image, but wanted to report it in case anyone else was experiencing the same issue.
The text was updated successfully, but these errors were encountered:
FROM debian:11-slim AS tools
RUN apt update && apt upgrade -y
# For original Dockerfile# See https://github.com/coredns/coredns/blob/master/DockerfileFROM docker.io/coredns/coredns:1.9.3
COPY --from=tools /bin/sleep /usr/bin/sleep
COPY --from=tools /lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu/libc.so.6
COPY --from=tools /lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2
While debugging some transient DNS issues in a cluster today, I noticed the following error in the cluster event logs:
I believe this change to the
coredns
base image led to thepreStop
lifecycle hook to no longer function correctly: coredns/coredns@a77d983 . Since/usr/bin/sleep
doesn't exist, the coredns pod is terminated immediately instead of respecting thepreStopSleep
value.I worked around this issue by building my own
coredns
image that had/usr/bin/sleep
. Not sure the best way to fix this given the empty base image, but wanted to report it in case anyone else was experiencing the same issue.The text was updated successfully, but these errors were encountered: