Giter Site home page Giter Site logo

alexvulaj / debug-me-maybe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rh-tguittet/debug-me-maybe

0.0 0.0 0.0 37 KB

Attaches the delve (dlv) golang debugger on a pid in a remote pod and forwards you its control socket

License: Apache License 2.0

Go 97.84% Makefile 2.16%

debug-me-maybe's Introduction

Debug Me Maybe

You know how ksniff allows to remote tcpdump a pod? Well this project attaches a debugger for Operators using dlv. This is purely an adaptation of the ksniff source code.

Build

make build install

Usage

Attach to pid #1 on the konnectivity-agent-p9ppv pod in the kube-system namespace and redirect the remote debugger port on your local machine (2345/TCP by default):

kubectl dmm -n kube-system konnectivity-agent-p9ppv

Trying to Ctrl+C to shut it all off will only stop the port-forward. If you want to also kill the remote debugger:

oc dmm -n kube-system konnectivity-agent-p9ppv --force-kill

How?

  1. Finds your pod
  2. Uploads dlv (https://github.com/go-delve/delve, a go debugger) onto the pod (in /tmp/dlv by default)
  3. Attaches the debugger for a pid on your pod and listens for debug commands on a port (2345/tcp by default)
  4. Locally spawns a port-forward (kubectl port-forward) to expose the remote debugger port onto your local machine

debug-me-maybe's People

Contributors

rh-tguittet avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.