Skip to content

Instantly share code, notes, and snippets.

@flrichar
Last active February 5, 2026 19:30
Show Gist options
  • Select an option

  • Save flrichar/96aa1c5888a3ae45f7151562fd9aad27 to your computer and use it in GitHub Desktop.

Select an option

Save flrichar/96aa1c5888a3ae45f7151562fd9aad27 to your computer and use it in GitHub Desktop.
go pprof profile from k8s vm node

Remote golang pprof

  • Enable pprof & optional debug in config.yaml for k3s
  • kubectl proxy, shoud choose port 8001 by default
  • go tool pprof http://localhost:8001/debug/pprof/profile for interactive funtimes
# k3s config ...
debug: true
enable-pprof: true
# restart if necessary ...

# on admin node with kubectl configured
kubectl proxy   # goes into background, open another window/tmux pane etc

go tool pprof http://localhost:8001/debug/pprof/profile      # sing a song, have some fun, follow options for debuggiest show on earth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment