Plugin for kubectl that will help you to gather diagnostic info from running in Kubernetes dotnet applications. It can work with .NET Core 3.0+ applications and Kubernetes clusters with docker runtime.
At the moment the following diagnostic tools are supported:
dotnet-gcdumpdotnet-trace
Inspired by kubectl-flame.
You can install kubectl shovel via krew.
At first install krew if you don't have it yet following the guide - Installing.
Then you will be able to install shovel plugin:
kubectl krew install shovel
You can find latest release on repository release page.
Once you download compatible with your OS binary, move it to any directory specified in your $PATH.
Feel free to use it as a kubectl plugin or standalone executable (kubectl shovel/kubectl-shovel)
Get gcdump:
kubectl shovel gcdump --pod-name pod-name-74df554df7-qldq7 -o ./dump.gcdumpOr trace:
kubectl shovel trace --pod-name pod-name-74df554df7-qldq7 -o ./trace.nettraceYou can find more info and examples in cli documentation or by using -h/--help flag.
It runs the job with specified tool on the specified pod's node and mount its /tmp folder with dotnet-diagnostic socket.
So it requires permissions to get pods and create jobs and allowance to mount /var/lib/docker path from a host in read-only mode.