dotnet / dotnet-monitor

This repository contains the source code for .NET Monitor - a tool that allows you to gather diagnostic data from running applications using HTTP endpoints
MIT License
640 stars 113 forks source link

Add support for kubectl debug scenarios #4971

Open wiktork opened 1 year ago

wiktork commented 1 year ago

It is currently possible to cross file namespace boundaries in Aks using kubectl debug. I.e.

kubectl debug $pod --image mcr.microsoft.com/dotnet/monitor:7 --env LoggingConsoleFormatterName=simple --target $app --share-processes --image-pull-policy Always -it -- /app/dotnet-monitor collect --no-auth --urls http://localhost:52323 --metrics false

It is necessary to prefix /proc/<pid>/<user>/tmpto the IpcRoot location as well as the default dump storage path. For dotnet-monitor 8, the image will not work against root apps since it still uses its default non-root security context.

wiktork commented 11 months ago

We can also potentially support dotnet-monitor running as a DaemonSet with a host mounted /proc