How to profile service running on kubernetes pod?
The two most common "no modifications" tracing tools are bpftrace and systemtap. No idea if either will work on GKE's COS though, you would definitely need to do it from the actual VM inside the tools sandbox, not from inside the pod. Or could use gprof but that requires compiling the executable with profiling support active.