~/talk

Ephemeral Containers in Action - Running a Go Debugger in Kubernetes - Marvin Beckers

Talkat ContainerDays 2023 · 2023-09-11..09-13· [kubernetes]
slides:none on file

Launches Delve inside an ephemeral container so a running pod never restarts, using kubectl debug with the --target flag to share PID/NS and attach to PID 1. Requires granting CAP_SYS_PTRACE (via the debug profile) and building Go with -gcflags="-N -l" to avoid optimizations that break breakpoints. Run Delve in headless DAP mode, kubectl port-forward the debug port to localhost, and connect from VS Code or Neovim. Works end to end but fails if cluster PSPs or policies forbid ptrace.

AI-written summary · about

  1. 0:00Introduction to ephemeral containers
  2. 1:06Debugging Go apps in Kubernetes
  3. 2:52Go debugging with Delve
  4. 5:47Linux capabilities for debugging
  5. 7:35Debug builds vs production builds
  6. 9:43Remote debugging with DAP
  7. 13:41Why use ephemeral containers
  8. 16:28How ephemeral containers work
  9. 18:57Using kubectl debug
  10. 21:26Required capabilities for tracing
  11. 23:14Launching Delve as ephemeral container
  12. 27:53Integrating with IDEs
  13. 30:48Live demo and results
  14. 32:56Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.