Don't add a shell back. Start with telemetry: structured logs, traces and runtime metrics (GC heap, thread pool queue length, exceptions) in Application Insights / OpenTelemetry usually narrow it down without touching the container. If you need live diagnostics on Kubernetes, attach an ephemeral debug container: kubectl debug -it <pod> --image=mcr.microsoft.com/dotnet/sdk:10.0 --target=<container> shares the process namespace, so dotnet-counters monitor -p 1 shows live metrics, dotnet-trace collect -p 1 captures a CPU trace and dotnet-dump collect -p 1 takes a memory dump. On Azure Container Apps or App Service, which don't offer kubectl debug, set DOTNET_DbgEnableMiniDump=1 to write crash dumps to mounted storage, or enable dotnet-monitor as a sidecar to collect dumps and traces over HTTP.
Checks they know the operational trade-off of distroless images
Last updated 23 Nov 2026.