dodopizza / kubectl-shovel

kubectl plugin for gathering diagnostics from running in k8s dotnet applications
Apache License 2.0
46 stars 5 forks source link

Feature request: store dump on host machine #12

Closed m00lecule closed 2 years ago

m00lecule commented 2 years ago

Hello,

Currently I am exploring your kubectl plugin but faced weird issues when making big gcdump.

$ kubectl shovel dump --pod-name XXXX -n YYYY  -o ./dump.dump
Spawning diagnostics job
Waiting for a job to start
Looking for and mapping container fs
Running command: dotnet-dump collect --process-id 1 --type Full
Gathering completed
Getting results from job
Error: Error while getting results: unexpected EOF

Its probably related with the dump size - ~2.7 GB's that is not efficient to copy it using kubectl cp.

du

pod logs: eof

I would like to request an additional feature - in which scenario the dump would be stored on host machine - for example /tmp. Later on I could copy it outside machine using aws s3 cp or to other storage.

ArtemTrofimushkin commented 2 years ago

Hi! We also facing sometimes with this behavior. Feature to leave dump on host machine will be implemented soon

ArtemTrofimushkin commented 2 years ago

Hi @m00lecule ! Requested feature available with this beta version Now, you can add flag --store-output-on-host (or -t shortcut) to commands. With this option, output will be stored in /tmp/kubectl-shovel folder of k8s node

ArtemTrofimushkin commented 2 years ago

Feature available since 0.6.0 release. Can be installed with krew plugin manager. Also, with additional flag --output-host-path default location (/tmp/kubectl-shovel) can be changed. This issue can be closed now. Feel free to reopen or create a new one, if any bugs discovered