<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Josep Damià Carbonell Seguí</title>
    <description>The latest articles on DEV Community by Josep Damià Carbonell Seguí (@josepdcs).</description>
    <link>https://dev.to/josepdcs</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3846625%2F21948a6a-85f9-4add-b5e0-c7655b5fd9cb.jpeg</url>
      <title>DEV Community: Josep Damià Carbonell Seguí</title>
      <link>https://dev.to/josepdcs</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/josepdcs"/>
    <language>en</language>
    <item>
      <title>kubectl-prof: Profile Your Kubernetes Applications with Zero Overhead and Zero Modifications</title>
      <dc:creator>Josep Damià Carbonell Seguí</dc:creator>
      <pubDate>Mon, 30 Mar 2026 15:28:05 +0000</pubDate>
      <link>https://dev.to/josepdcs/kubectl-prof-profile-your-kubernetes-applications-with-zero-overhead-and-zero-modifications-1bob</link>
      <guid>https://dev.to/josepdcs/kubectl-prof-profile-your-kubernetes-applications-with-zero-overhead-and-zero-modifications-1bob</guid>
      <description>&lt;h1&gt;
  
  
  🔥 kubectl-prof: Profile Your Kubernetes Apps Without Touching Them
&lt;/h1&gt;

&lt;p&gt;Have you ever needed to debug a performance issue in a production Kubernetes pod and thought: &lt;em&gt;"I wish I could just attach a profiler without restarting anything"&lt;/em&gt;?&lt;/p&gt;

&lt;p&gt;That's exactly what &lt;strong&gt;&lt;a href="https://github.com/josepdcs/kubectl-prof" rel="noopener noreferrer"&gt;kubectl-prof&lt;/a&gt;&lt;/strong&gt; solves.&lt;/p&gt;

&lt;p&gt;It's a &lt;code&gt;kubectl&lt;/code&gt; plugin that lets you profile running pods — generating FlameGraphs, JFR files, heap dumps, thread dumps, memory dumps, and more — &lt;strong&gt;without modifying your deployments, without restarting pods, and with minimal overhead&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  ✨ What Makes It Special?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🎯 &lt;strong&gt;Zero modifications&lt;/strong&gt; — attach to any running pod, no sidecar needed&lt;/li&gt;
&lt;li&gt;🌐 &lt;strong&gt;Multi-language&lt;/strong&gt; — Java, Go, Python, Ruby, Node.js, Rust, Clang/Clang++, PHP, .NET&lt;/li&gt;
&lt;li&gt;📊 &lt;strong&gt;Rich output formats&lt;/strong&gt; — FlameGraphs, JFR, SpeedScope, thread dumps, heap dumps, GC dumps, memory dumps, memory flamegraphs, allocation summaries, and more&lt;/li&gt;
&lt;li&gt;⚡ &lt;strong&gt;Low overhead&lt;/strong&gt; — minimal impact on production workloads&lt;/li&gt;
&lt;li&gt;🔄 &lt;strong&gt;Continuous profiling&lt;/strong&gt; — support for both one-shot and interval-based modes&lt;/li&gt;
&lt;li&gt;🐳 &lt;strong&gt;Multiple runtimes&lt;/strong&gt; — &lt;code&gt;containerd&lt;/code&gt; and &lt;code&gt;CRI-O&lt;/code&gt; supported&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🚀 Quick Start
&lt;/h2&gt;

&lt;p&gt;Install via &lt;a href="https://github.com/kubernetes-sigs/krew" rel="noopener noreferrer"&gt;Krew&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl krew index add kubectl-prof https://github.com/josepdcs/kubectl-prof
kubectl krew &lt;span class="nb"&gt;install &lt;/span&gt;kubectl-prof/prof
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Profile a Java app for 1 minute and get a FlameGraph:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl prof my-pod &lt;span class="nt"&gt;-t&lt;/span&gt; 1m &lt;span class="nt"&gt;-l&lt;/span&gt; java
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Profile a Python app and save the output to &lt;code&gt;/tmp&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl prof my-pod &lt;span class="nt"&gt;-t&lt;/span&gt; 1m &lt;span class="nt"&gt;-l&lt;/span&gt; python &lt;span class="nt"&gt;--local-path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/tmp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. A profiling Job is spun up on the same node, profiles the target pod, and delivers the result back to your terminal.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔧 How It Works
&lt;/h2&gt;

&lt;p&gt;When you run &lt;code&gt;kubectl prof&lt;/code&gt;, it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Identifies the node where your target pod is running&lt;/li&gt;
&lt;li&gt;Launches a Kubernetes Job on that same node with the appropriate profiling agent image&lt;/li&gt;
&lt;li&gt;The agent attaches to the running container process using language-specific tools&lt;/li&gt;
&lt;li&gt;Results are streamed back and saved locally&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;No changes to your application. No restarts. No sidecars.&lt;/p&gt;




&lt;h2&gt;
  
  
  💻 Language Support
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ☕ Java (JVM)
&lt;/h3&gt;

&lt;p&gt;kubectl-prof supports both &lt;strong&gt;async-profiler&lt;/strong&gt; and &lt;strong&gt;jcmd&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# FlameGraph (default, uses async-profiler)&lt;/span&gt;
kubectl prof mypod &lt;span class="nt"&gt;-t&lt;/span&gt; 5m &lt;span class="nt"&gt;-l&lt;/span&gt; java &lt;span class="nt"&gt;-o&lt;/span&gt; flamegraph

&lt;span class="c"&gt;# JFR recording&lt;/span&gt;
kubectl prof mypod &lt;span class="nt"&gt;-t&lt;/span&gt; 5m &lt;span class="nt"&gt;-l&lt;/span&gt; java &lt;span class="nt"&gt;-o&lt;/span&gt; jfr

&lt;span class="c"&gt;# Thread dump&lt;/span&gt;
kubectl prof mypod &lt;span class="nt"&gt;-l&lt;/span&gt; java &lt;span class="nt"&gt;-o&lt;/span&gt; threaddump

&lt;span class="c"&gt;# Heap dump&lt;/span&gt;
kubectl prof mypod &lt;span class="nt"&gt;-l&lt;/span&gt; java &lt;span class="nt"&gt;-o&lt;/span&gt; heapdump &lt;span class="nt"&gt;--tool&lt;/span&gt; jcmd

&lt;span class="c"&gt;# Heap histogram&lt;/span&gt;
kubectl prof mypod &lt;span class="nt"&gt;-l&lt;/span&gt; java &lt;span class="nt"&gt;-o&lt;/span&gt; heaphistogram &lt;span class="nt"&gt;--tool&lt;/span&gt; jcmd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also target specific profiling events with async-profiler:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# CPU (default: ctimer), memory allocation, or lock contention&lt;/span&gt;
kubectl prof mypod &lt;span class="nt"&gt;-t&lt;/span&gt; 5m &lt;span class="nt"&gt;-l&lt;/span&gt; java &lt;span class="nt"&gt;-e&lt;/span&gt; alloc
kubectl prof mypod &lt;span class="nt"&gt;-t&lt;/span&gt; 5m &lt;span class="nt"&gt;-l&lt;/span&gt; java &lt;span class="nt"&gt;-e&lt;/span&gt; lock
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And pass extra arguments directly to async-profiler:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Wall-clock profiling in per-thread mode&lt;/span&gt;
kubectl prof mypod &lt;span class="nt"&gt;-t&lt;/span&gt; 5m &lt;span class="nt"&gt;-l&lt;/span&gt; java &lt;span class="nt"&gt;-e&lt;/span&gt; wall &lt;span class="nt"&gt;--async-profiler-args&lt;/span&gt; &lt;span class="nt"&gt;-t&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Alpine-based containers, add &lt;code&gt;--alpine&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl prof mypod &lt;span class="nt"&gt;-t&lt;/span&gt; 1m &lt;span class="nt"&gt;-l&lt;/span&gt; java &lt;span class="nt"&gt;-o&lt;/span&gt; flamegraph &lt;span class="nt"&gt;--alpine&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🐍 Python
&lt;/h3&gt;

&lt;p&gt;Uses &lt;strong&gt;&lt;a href="https://github.com/benfred/py-spy" rel="noopener noreferrer"&gt;py-spy&lt;/a&gt;&lt;/strong&gt; under the hood:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl prof mypod &lt;span class="nt"&gt;-t&lt;/span&gt; 1m &lt;span class="nt"&gt;-l&lt;/span&gt; python &lt;span class="nt"&gt;-o&lt;/span&gt; flamegraph
kubectl prof mypod &lt;span class="nt"&gt;-l&lt;/span&gt; python &lt;span class="nt"&gt;-o&lt;/span&gt; threaddump
kubectl prof mypod &lt;span class="nt"&gt;-t&lt;/span&gt; 1m &lt;span class="nt"&gt;-l&lt;/span&gt; python &lt;span class="nt"&gt;-o&lt;/span&gt; speedscope
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  🧠 Memory Profiling with Memray
&lt;/h4&gt;

&lt;p&gt;For memory profiling, kubectl-prof now integrates &lt;strong&gt;&lt;a href="https://github.com/bloomberg/memray" rel="noopener noreferrer"&gt;Memray&lt;/a&gt;&lt;/strong&gt; — Bloomberg's powerful Python memory profiler. While py-spy reveals &lt;em&gt;where your CPU time goes&lt;/em&gt;, memray reveals &lt;em&gt;where your memory goes&lt;/em&gt;: every allocation, every deallocation, tracked in real time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How it works (zero-downtime, zero code changes):&lt;/strong&gt;&lt;br&gt;
Memray attaches to the running Python process via &lt;strong&gt;GDB injection&lt;/strong&gt;, enters the target container's network namespace via &lt;code&gt;nsenter&lt;/code&gt;, and runs &lt;code&gt;memray attach --aggregate&lt;/code&gt; directly against the live process. The agent automatically stages a version-matched memray package into the target container's filesystem — no memray installation is required in your application image.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Requirements:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;SYS_PTRACE&lt;/code&gt; + &lt;code&gt;SYS_ADMIN&lt;/code&gt; capabilities — added &lt;strong&gt;automatically&lt;/strong&gt; when &lt;code&gt;--tool memray&lt;/code&gt; is used&lt;/li&gt;
&lt;li&gt;Python &lt;strong&gt;3.10, 3.11, 3.12, 3.13&lt;/strong&gt; (glibc-based images only)&lt;/li&gt;
&lt;li&gt;❌ Not supported: Alpine/musl targets or statically-linked Python builds&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Output types:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Output&lt;/th&gt;
&lt;th&gt;Flag&lt;/th&gt;
&lt;th&gt;Format&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Memory flamegraph&lt;/td&gt;
&lt;td&gt;&lt;code&gt;-o flamegraph&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;HTML&lt;/td&gt;
&lt;td&gt;Interactive flamegraph of allocation call stacks &amp;amp; sizes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Allocation summary&lt;/td&gt;
&lt;td&gt;&lt;code&gt;-o summary&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Text&lt;/td&gt;
&lt;td&gt;Tabular list of top allocators by total bytes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Interactive HTML memory flamegraph — open in any browser&lt;/span&gt;
kubectl prof mypod &lt;span class="nt"&gt;-t&lt;/span&gt; 1m &lt;span class="nt"&gt;-l&lt;/span&gt; python &lt;span class="nt"&gt;--tool&lt;/span&gt; memray &lt;span class="nt"&gt;-o&lt;/span&gt; flamegraph &lt;span class="nt"&gt;--local-path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/tmp

&lt;span class="c"&gt;# Text summary of the biggest allocators&lt;/span&gt;
kubectl prof mypod &lt;span class="nt"&gt;-t&lt;/span&gt; 1m &lt;span class="nt"&gt;-l&lt;/span&gt; python &lt;span class="nt"&gt;--tool&lt;/span&gt; memray &lt;span class="nt"&gt;-o&lt;/span&gt; summary &lt;span class="nt"&gt;--local-path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/tmp

&lt;span class="c"&gt;# Long session with custom heartbeat (keeps the connection alive through proxies)&lt;/span&gt;
kubectl prof mypod &lt;span class="nt"&gt;-t&lt;/span&gt; 10m &lt;span class="nt"&gt;-l&lt;/span&gt; python &lt;span class="nt"&gt;--tool&lt;/span&gt; memray &lt;span class="nt"&gt;-o&lt;/span&gt; flamegraph &lt;span class="nt"&gt;--heartbeat-interval&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;15s

&lt;span class="c"&gt;# Target a specific process in a multi-process pod&lt;/span&gt;
kubectl prof mypod &lt;span class="nt"&gt;-t&lt;/span&gt; 2m &lt;span class="nt"&gt;-l&lt;/span&gt; python &lt;span class="nt"&gt;--tool&lt;/span&gt; memray &lt;span class="nt"&gt;-o&lt;/span&gt; flamegraph &lt;span class="nt"&gt;--pid&lt;/span&gt; 1234
kubectl prof mypod &lt;span class="nt"&gt;-t&lt;/span&gt; 2m &lt;span class="nt"&gt;-l&lt;/span&gt; python &lt;span class="nt"&gt;--tool&lt;/span&gt; memray &lt;span class="nt"&gt;-o&lt;/span&gt; flamegraph &lt;span class="nt"&gt;--pgrep&lt;/span&gt; my-worker
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;code&gt;--tool memray&lt;/code&gt; must be set explicitly. The default Python tool remains py-spy.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h3&gt;
  
  
  🐹 Go
&lt;/h3&gt;

&lt;p&gt;Uses eBPF profiling. Two options available:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# BPF (default) — requires kernel headers&lt;/span&gt;
kubectl prof mypod &lt;span class="nt"&gt;-t&lt;/span&gt; 1m &lt;span class="nt"&gt;-l&lt;/span&gt; go &lt;span class="nt"&gt;-o&lt;/span&gt; flamegraph

&lt;span class="c"&gt;# BTF (CO-RE) — no kernel headers needed, works on modern kernels&lt;/span&gt;
kubectl prof mypod &lt;span class="nt"&gt;-t&lt;/span&gt; 1m &lt;span class="nt"&gt;-l&lt;/span&gt; go &lt;span class="nt"&gt;--tool&lt;/span&gt; btf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The BTF option is great for cloud providers like DigitalOcean where kernel headers may not be available.&lt;/p&gt;




&lt;h3&gt;
  
  
  📗 Node.js
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# FlameGraph via eBPF&lt;/span&gt;
kubectl prof mypod &lt;span class="nt"&gt;-t&lt;/span&gt; 1m &lt;span class="nt"&gt;-l&lt;/span&gt; node &lt;span class="nt"&gt;-o&lt;/span&gt; flamegraph

&lt;span class="c"&gt;# Heap snapshot&lt;/span&gt;
kubectl prof mypod &lt;span class="nt"&gt;-l&lt;/span&gt; node &lt;span class="nt"&gt;-o&lt;/span&gt; heapsnapshot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Tip: Run Node.js with &lt;code&gt;--perf-basic-prof&lt;/code&gt; for better JavaScript symbol resolution.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  💎 Ruby
&lt;/h3&gt;

&lt;p&gt;Uses &lt;strong&gt;&lt;a href="https://rbspy.github.io/" rel="noopener noreferrer"&gt;rbspy&lt;/a&gt;&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl prof mypod &lt;span class="nt"&gt;-t&lt;/span&gt; 1m &lt;span class="nt"&gt;-l&lt;/span&gt; ruby &lt;span class="nt"&gt;-o&lt;/span&gt; flamegraph
kubectl prof mypod &lt;span class="nt"&gt;-t&lt;/span&gt; 1m &lt;span class="nt"&gt;-l&lt;/span&gt; ruby &lt;span class="nt"&gt;-o&lt;/span&gt; speedscope
kubectl prof mypod &lt;span class="nt"&gt;-t&lt;/span&gt; 1m &lt;span class="nt"&gt;-l&lt;/span&gt; ruby &lt;span class="nt"&gt;-o&lt;/span&gt; callgrind
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🦀 Rust
&lt;/h3&gt;

&lt;p&gt;Uses &lt;strong&gt;&lt;a href="https://github.com/flamegraph-rs/flamegraph" rel="noopener noreferrer"&gt;cargo-flamegraph&lt;/a&gt;&lt;/strong&gt; for Rust-optimized profiling with great symbol resolution:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl prof mypod &lt;span class="nt"&gt;-t&lt;/span&gt; 1m &lt;span class="nt"&gt;-l&lt;/span&gt; rust &lt;span class="nt"&gt;-o&lt;/span&gt; flamegraph
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🐘 PHP
&lt;/h3&gt;

&lt;p&gt;Uses &lt;strong&gt;&lt;a href="https://github.com/adsr/phpspy" rel="noopener noreferrer"&gt;phpspy&lt;/a&gt;&lt;/strong&gt; — works with PHP 7+, zero modifications needed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl prof mypod &lt;span class="nt"&gt;-t&lt;/span&gt; 1m &lt;span class="nt"&gt;-l&lt;/span&gt; php &lt;span class="nt"&gt;-o&lt;/span&gt; flamegraph
kubectl prof mypod &lt;span class="nt"&gt;-t&lt;/span&gt; 1m &lt;span class="nt"&gt;-l&lt;/span&gt; php &lt;span class="nt"&gt;-o&lt;/span&gt; raw
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🟣 .NET (Core / .NET 5+)
&lt;/h3&gt;

&lt;p&gt;This is where kubectl-prof really shines. Four tools from the &lt;a href="https://github.com/dotnet/diagnostics" rel="noopener noreferrer"&gt;.NET diagnostics suite&lt;/a&gt; are fully supported:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Output&lt;/th&gt;
&lt;th&gt;Use case&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;dotnet-trace&lt;/code&gt; (default)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;.speedscope.json&lt;/code&gt; or &lt;code&gt;.nettrace&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;CPU traces &amp;amp; runtime events&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;dotnet-gcdump&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.gcdump&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;GC heap snapshot&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;dotnet-counters&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.json&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Real-time performance counters&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;dotnet-dump&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.dmp&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Full memory dump&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# CPU trace → open in speedscope.app&lt;/span&gt;
kubectl prof mypod &lt;span class="nt"&gt;-t&lt;/span&gt; 30s &lt;span class="nt"&gt;-l&lt;/span&gt; dotnet &lt;span class="nt"&gt;-o&lt;/span&gt; speedscope

&lt;span class="c"&gt;# GC heap dump&lt;/span&gt;
kubectl prof mypod &lt;span class="nt"&gt;-l&lt;/span&gt; dotnet &lt;span class="nt"&gt;--tool&lt;/span&gt; dotnet-gcdump &lt;span class="nt"&gt;-o&lt;/span&gt; gcdump

&lt;span class="c"&gt;# Performance counters (CPU, GC, thread pool, exceptions…)&lt;/span&gt;
kubectl prof mypod &lt;span class="nt"&gt;-t&lt;/span&gt; 30s &lt;span class="nt"&gt;-l&lt;/span&gt; dotnet &lt;span class="nt"&gt;--tool&lt;/span&gt; dotnet-counters &lt;span class="nt"&gt;-o&lt;/span&gt; counters

&lt;span class="c"&gt;# Full memory dump&lt;/span&gt;
kubectl prof mypod &lt;span class="nt"&gt;-l&lt;/span&gt; dotnet &lt;span class="nt"&gt;--tool&lt;/span&gt; dotnet-dump &lt;span class="nt"&gt;-o&lt;/span&gt; dump
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🎯 Advanced Features
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Profile Multiple Pods at Once
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl prof &lt;span class="nt"&gt;--selector&lt;/span&gt; &lt;span class="nv"&gt;app&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;myapp &lt;span class="nt"&gt;-t&lt;/span&gt; 5m &lt;span class="nt"&gt;-l&lt;/span&gt; java &lt;span class="nt"&gt;-o&lt;/span&gt; jfr
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;⚠️ Use with caution — this profiles ALL matching pods.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Continuous Profiling
&lt;/h3&gt;

&lt;p&gt;Generate results at regular intervals:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl prof mypod &lt;span class="nt"&gt;-l&lt;/span&gt; java &lt;span class="nt"&gt;-t&lt;/span&gt; 5m &lt;span class="nt"&gt;--interval&lt;/span&gt; 60s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Target a Specific Process
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# By PID&lt;/span&gt;
kubectl prof mypod &lt;span class="nt"&gt;-l&lt;/span&gt; java &lt;span class="nt"&gt;--pid&lt;/span&gt; 1234

&lt;span class="c"&gt;# By process name&lt;/span&gt;
kubectl prof mypod &lt;span class="nt"&gt;-l&lt;/span&gt; java &lt;span class="nt"&gt;--pgrep&lt;/span&gt; java-app-process
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Custom Resource Limits
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl prof mypod &lt;span class="nt"&gt;-l&lt;/span&gt; java &lt;span class="nt"&gt;-t&lt;/span&gt; 5m &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--cpu-limits&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--cpu-requests&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;100m &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--mem-limits&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;200Mi &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--mem-requests&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;100Mi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Cross-Namespace Profiling
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl prof mypod &lt;span class="nt"&gt;-n&lt;/span&gt; profiling &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--service-account&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;profiler &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--target-namespace&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;my-apps &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-l&lt;/span&gt; go
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Handle Large Output Files
&lt;/h3&gt;

&lt;p&gt;For heap dumps, memory dumps, and other large files, split them into chunks for easier transfer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl prof mypod &lt;span class="nt"&gt;-l&lt;/span&gt; java &lt;span class="nt"&gt;-o&lt;/span&gt; heapdump &lt;span class="nt"&gt;--tool&lt;/span&gt; jcmd &lt;span class="nt"&gt;--output-split-size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;100M
kubectl prof mypod &lt;span class="nt"&gt;-l&lt;/span&gt; dotnet &lt;span class="nt"&gt;--tool&lt;/span&gt; dotnet-dump &lt;span class="nt"&gt;-o&lt;/span&gt; dump &lt;span class="nt"&gt;--output-split-size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;500M
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Node Tolerations
&lt;/h3&gt;

&lt;p&gt;Profile pods on nodes with taints:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl prof my-pod &lt;span class="nt"&gt;-t&lt;/span&gt; 5m &lt;span class="nt"&gt;-l&lt;/span&gt; java &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--tolerations&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;node.kubernetes.io/disk-pressure&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;:NoSchedule &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--tolerations&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;dedicated&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;profiling:PreferNoSchedule
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  📦 Installation Options
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Krew (Recommended)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl krew index add kubectl-prof https://github.com/josepdcs/kubectl-prof
kubectl krew &lt;span class="nb"&gt;install &lt;/span&gt;kubectl-prof/prof
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Pre-built Binaries
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Linux x86_64&lt;/span&gt;
wget https://github.com/josepdcs/kubectl-prof/releases/download/1.11.1/kubectl-prof_1.11.1_linux_amd64.tar.gz
&lt;span class="nb"&gt;tar &lt;/span&gt;xvfz kubectl-prof_1.11.1_linux_amd64.tar.gz
&lt;span class="nb"&gt;sudo install &lt;/span&gt;kubectl-prof /usr/local/bin/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Build from Source
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go get &lt;span class="nt"&gt;-d&lt;/span&gt; github.com/josepdcs/kubectl-prof
&lt;span class="nb"&gt;cd&lt;/span&gt; &lt;span class="nv"&gt;$GOPATH&lt;/span&gt;/src/github.com/josepdcs/kubectl-prof
make install-deps
make build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🧠 When Should You Use kubectl-prof?
&lt;/h2&gt;

&lt;p&gt;kubectl-prof is the tool you want when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🔥 You're hitting &lt;strong&gt;unexpected CPU spikes&lt;/strong&gt; in production and need a FlameGraph &lt;em&gt;now&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;💾 You suspect a &lt;strong&gt;memory leak&lt;/strong&gt; and want a heap dump without restarting&lt;/li&gt;
&lt;li&gt;🐌 Your app is &lt;strong&gt;slow&lt;/strong&gt; and you need to identify the bottleneck across any language&lt;/li&gt;
&lt;li&gt;🔄 You need &lt;strong&gt;continuous profiling&lt;/strong&gt; over time with interval-based snapshots&lt;/li&gt;
&lt;li&gt;🚫 You &lt;strong&gt;can't modify&lt;/strong&gt; the running workload (no sidecars, no redeploys)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🤝 Contributing
&lt;/h2&gt;

&lt;p&gt;The project is open source (Apache 2.0) and welcomes contributions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🐛 Bug reports and fixes&lt;/li&gt;
&lt;li&gt;💡 Feature requests&lt;/li&gt;
&lt;li&gt;📝 Documentation improvements&lt;/li&gt;
&lt;li&gt;🔧 Pull requests&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check the &lt;a href="https://github.com/josepdcs/kubectl-prof/blob/main/Contributing.md" rel="noopener noreferrer"&gt;Contributing guide&lt;/a&gt; and give the repo a ⭐ if you find it useful!&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/josepdcs/kubectl-prof" rel="noopener noreferrer"&gt;https://github.com/josepdcs/kubectl-prof&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Have you tried kubectl-prof? What language or profiling scenario would you like to see covered next? Drop a comment below! 👇&lt;/em&gt;&lt;/p&gt;

</description>
      <category>go</category>
      <category>kubernetes</category>
      <category>performance</category>
      <category>containers</category>
    </item>
  </channel>
</rss>
