Skip to content

Releases: josepdcs/kubectl-prof

1.9.0

30 Dec 17:17
313554f

Choose a tag to compare

🦀 Rust Profiling

Profile a Rust application using cargo-flamegraph (default and recommended):

kubectl prof mypod -t 1m -l rust -o flamegraph

🔥 cargo-flamegraph Benefits

kubectl-prof uses cargo-flamegraph as the default profiling tool for Rust applications, offering several advantages:

  • 📊 Rust-optimized profiling - Specifically designed for Rust applications with excellent symbol resolution
  • 🎨 Beautiful visualizations - Generates clean, colorized FlameGraphs with Rust-specific color palette
  • ⚡ Low overhead - Minimal performance impact during profiling
  • 🔍 Deep insights - Captures detailed stack traces including inline functions and generics
  • 🛠️ Built on perf - Leverages the powerful Linux perf tool under the hood

Available output format:

  • flamegraph - Interactive FlameGraph visualization (SVG format)

What's Changed

  • chore(deps): bump k8s.io/cli-runtime from 0.34.2 to 0.34.3 by @dependabot[bot] in #90
  • chore(deps): bump k8s.io/kubectl from 0.34.2 to 0.34.3 by @dependabot[bot] in #88
  • chore(deps): bump github.com/spf13/cobra from 1.10.1 to 1.10.2 by @dependabot[bot] in #86
  • chore(deps): bump k8s.io/client-go from 0.34.3 to 0.35.0 by @dependabot[bot] in #91
  • chore(deps): bump k8s.io/cli-runtime from 0.34.3 to 0.35.0 by @dependabot[bot] in #95
  • chore(deps): bump k8s.io/kubectl from 0.34.3 to 0.35.0 by @dependabot[bot] in #93
  • Implement profiling for Rust using flamegraph-rs/flamegraph by @josepdcs in #96

Full Changelog: 1.8.1...1.9.0

1.8.1

03 Dec 09:44
b6b8b82

Choose a tag to compare

Changelog

  • b6b8b82 chore(deps): bump github.com/klauspost/compress from 1.18.1 to 1.18.2 (#85)

1.8.0

14 Nov 09:23
6a60046

Choose a tag to compare

What's Changed

  • Upgrade async-profiler to 4.2 by @isra17 in #76
  • Ctimer event type for async-profiler 4.x is available now by @josepdcs in #79
  • Agent: Use the /kubectl-prof/ shared directory instead of /tmp by @isra17 in #77
  • Fix development environment by @isra17 in #75
  • Readme rewritten by @josepdcs in #80
  • Output agent logs by @isra17 in #78
  • Updated dependencies and polishing by @josepdcs in #81

New Contributors

Full Changelog: 1.7.0...1.8.0

1.7.0

25 Oct 15:33
062ce7c

Choose a tag to compare

Changelog

1.6.0

22 Aug 11:56
7896d22

Choose a tag to compare

Changelog

1.5.0

23 Dec 09:48
ac93240

Choose a tag to compare

Changelog

Highlights

Support for obtaining memory heap snapshots for NodeJS apps

With this new feature, it is now possible to obtain a memory heap snapshot for a NodeJS app by using the -o heapsnapshot option.

Example:

kubectl prof mypod -l node -o heapsnapshot

For profiling NodeJS Pod and to generate the heap snapshot output, node process needs to be run with --heapsnapshot-signal flag. Something like that:

CMD [ "node", "--perf-basic-prof", "--heapsnapshot-signal=SIGUSR2", "app2.js" ]

Information about that here and here.

Capabilities have been reduced from SYS_ADMIN to PERFMON and SYSLOG by default for profiling Java pods

According to the Kernel documentation, PERFMON and SYSLOG should be enough for collecting performance samples.

However, if you need to run with SYS_ADMIN, you can specify it using the new --capabilities option. This one can be used multiple times to add more than one capability.

Example:

kubectl prof my-pod -t 5m -l java -o flamegraph --local-path=/tmp --capabilities=SYS_ADMIN

Features

  • feat(GH-54): Support for obtaining memory heap snapshots for NodeJS apps (#56)
  • feat(GH-25): Reduced capabilities from SYS_ADMIN to PERFMON and SYSLOG for profiling Java pods (#58)
  • chore(deps): Bump Go from 1.22.5 to 1.23.4 (#57)

1.4.1

06 Nov 15:39
acb94c9

Choose a tag to compare

Changelog

  • (fix): Support multi-arch for agent (#48)
  • chore(deps): Bump rb-spy from 0.18.1 to 0.26.0 (#53)
  • chore(deps): Bump py-spy from 0.3.14 to 0.4.0 (#51)

1.3.0

02 Nov 14:48
3426806

Choose a tag to compare

Changelog

Highlights

Profiling a bunch of pods by using a label selector

Now kubectl-prof supports profiling a set of pods with a specific selector. They can be filtered using the --selector option. For example:

  • Profile the pods with the label selector "app=my-app" for 5 minutes with JFR format for java language by using --selector option:
kubectl prof --selector app=myapp -t 5m -l java -o jfr

⚠️ ATTENTION: use this option with caution, it will profile all the pods that match the label selector.

In addition, you can define the number of pods to be profiled simultaneously by using --pool-size-profiling-jobs.
For example, the following command will profile five pods simultaneously:

kubectl prof --selector app=myapp -t 5m -l java -o jfr --pool-size-profiling-jobs 5

Features

  • 3426806 feat(GH-46): Profiling a bunch of pods by using a label selector (#49)

1.2.6

25 Oct 17:57
fa77d9c

Choose a tag to compare

Changelog

1.2.5

15 Oct 09:11
90b114a

Choose a tag to compare

Changelog

  • 90b114a fix(GH-39): containerd sometimes store the pid in contarinerID.pid file (#40)