Automatic merge from submit-queue (batch tested with PRs 59010, 59212, 59281, 59014, 59297). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Improve error returned when fetching container logs during pod termination **What this PR does / why we need it**: This change better handles fetching of logs when a container is in a crash loop backoff state. In cases where it is unable to fetch the logs, it gives a helpful error message back to a user who has requested logs of a container from a terminated pod. Rather than attempting to get logs for a container using an empty container ID, it returns a useful error message. In cases where the container runtime gets an error, log the error but don't leak it back through the API to the user. **Which issue(s) this PR fixes**: Fixes #59296 **Release note**: ```release-note NONE ```
34 KiB
34 KiB