-
Notifications
You must be signed in to change notification settings - Fork 122
Adding Docs for Ephemeral container use #8716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@dotnet-policy-bot agree company="Microsoft" |
| 2. Target pod created with required env vars, volume, and volume mounts. See example [template](./_dotnetmonitor.tpl). | ||
|
|
||
| ## Inject dotnet monitor into a Pod | ||
| Prepare a [config file](config.yaml) whose values match the target's deployment as it does our [example template](./_dotnetmonitor.tpl). This step is performed once per pod lifetime; the ephemeral container persists until the pod restarts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove the tpl file references here. You can point to our other docs regarding the app's environment/mounting configuration.
| MonitorPort=52323 | ||
|
|
||
| kubectl debug -n "$Namespace" "pod/$Pod" \ | ||
| --image "mcr.microsoft.com/dotnet/monitor:8.0" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider pointing to 10 since it just released.
| kubectl debug -n "$Namespace" "pod/$Pod" \ | ||
| --image "mcr.microsoft.com/dotnet/monitor:8.0" \ | ||
| --container "debugger" \ | ||
| --target "$AppContainer" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that target is not strictly necessary since you are connecting over volume mounts anyway.
wiktork
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing this! I added some minor feedback.
Summary
I wanted to add some clarity into how to leverage kubectl in order to make a quick injection of a dotnet monitor container to debug running .Net containers with minimal steps.
Release Notes Entry