Giter VIP home page Giter VIP logo

Comments (9)

aylei avatar aylei commented on August 15, 2024 3

Sure! I will implement a working prototype this days, hope that fits your case.

from kubectl-debug.

aylei avatar aylei commented on August 15, 2024

This feature can be really useful but cannot be implemented "directly" IMHO, because the problematic container in the crashing pod is re-created constantly, there is no consistent pid namespace to diagnose the container process.
A possible workaround is 'fork' a new pod, overwrite the container entrypoint to something like 'bash', and diagnose the new pod, which is adopted by the oc debug command. I planned to add the same feature in #1

from kubectl-debug.

andreyradygin avatar andreyradygin commented on August 15, 2024

Oh sorry, you're right, I should read old issues more carefully.
I was thinking about this problem and come to the same conclusion.
BUT, we need fork bad pod/container with some "bash" command AND possibility to attach to it with debug image at the same time.

Btw, I have a lot of opportunities to test your utility if you interesting.

from kubectl-debug.

aylei avatar aylei commented on August 15, 2024

@andreioss
I've add the basic support in #11 , would you like to try it out and give me some feedback?

Note: when you enter the debug container, the filesystem of forked container is located in /proc/$pid/root. If you want to run some binaries of forked container, run chroot /proc/$pid/root sh first.

from kubectl-debug.

andreyradygin avatar andreyradygin commented on August 15, 2024

@aylei
Hi!
Of course I'll try and test!
Should I build plugin binary from your PR files?

from kubectl-debug.

aylei avatar aylei commented on August 15, 2024

Just fetch the issue-1 branch, or I will release a preview binary this night😄

from kubectl-debug.

andreyradygin avatar andreyradygin commented on August 15, 2024

If you'll provide the binary, it would be great, thanks :)

from kubectl-debug.

aylei avatar aylei commented on August 15, 2024

https://github.com/aylei/kubectl-debug/releases/tag/0.0.2-pre

Tested locally and seems fine for me, looking forward to your advice!

from kubectl-debug.

aylei avatar aylei commented on August 15, 2024

@andreyradygin
I've merged this feature and you may access it in the pre-release before the 0.2.0 release comes out.

from kubectl-debug.

Related Issues (20)

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.