Commit Graph

4 Commits

Author SHA1 Message Date
Ricardo Pchevuzinske Katz
912d9673cb kubectl flush profiling when get a sigterm
Signed-off-by: Ricardo Pchevuzinske Katz <ricardo.katz@gmail.com>
2020-10-29 17:15:12 -03:00
Sean Sullivan
2621e6a0d6 Unexport kubectl cmd profiling 2019-08-02 12:45:15 -07:00
Sean Sullivan
0e0ea52339 Move pkg/kubectl/cmd/{command} to staging 2019-08-01 11:01:40 -07:00
Damien Lespiau
5d634e7db6 Add go profile instrumentation to kubectl
This commit adds two new global options to kubectl: --profile and
--profile-output, writing out go profiles to disk to debug interesting and
unexpected kubectl behaviour.

As an example, here is how to capture a block file, eg. for how long are we
blocked on I/O and where?

$ kubectl get nodes --profile=mutex -v6
$ go tool pprof -png ./profile.pprof > out.png
$ google-chrome out.png

Fixes: #68679
2018-09-18 18:28:43 +01:00