Comments (9)
Sure! I will implement a working prototype this days, hope that fits your case.
from kubectl-debug.
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.
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.
@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.
@aylei
Hi!
Of course I'll try and test!
Should I build plugin binary from your PR files?
from kubectl-debug.
Just fetch the issue-1
branch, or I will release a preview binary this night😄
from kubectl-debug.
If you'll provide the binary, it would be great, thanks :)
from kubectl-debug.
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.
@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)
- Plugin stuck creating exec stream
- plan to support sts
- Error: No such image HOT 2
- Error: No such image: nicolaka/netshoot:latest HOT 18
- The default agent image version should be coordinated with the plugin
- Do not use HostPort when using --port-forward
- Agent pod failed HOT 4
- not output command result when excute no interactive command
- `RegistrySecretName` inf config file don't work HOT 2
- Errors with containerd runtime HOT 2
- cannot get the debug docker image No such image: docker.io/nicolaka/netshoot:latest HOT 2
- I can't join some pods HOT 1
- k8s.io/api/admissionregistration/v1alpha1: module k8s.io/api@latest found (v0.20.5), but does not contain package k8s.io/api/admissionregistration/v1alpha1 HOT 1
- aliyun-exporter使用时出现错误
- If my target pod has multiple contianers? HOT 1
- Seems the kubectl has build-in debug sub command, it conflicts with it HOT 2
- What is the reason behind `CGO_ENABLED=0`?
- parse namespace error HOT 1
- 项目是结束维护了么,好久没看到更新 HOT 2
- run error when use containerd runtime
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubectl-debug.