You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -234,15 +234,27 @@ py-spy needs `SYS_PTRACE` to be able to read process memory. Kubernetes drops th
234
234
```
235
235
Permission Denied: Try running again with elevated permissions by going 'sudo env "PATH=$PATH" !!'
236
236
```
237
-
The recommended way to deal with this is to edit the spec and add that capability. For a deployment, this is done by adding this to `Deployment.spec.template.spec.containers`
237
+
The recommended way to deal with this is to edit the spec and add that capability. For a Deployment, this is done by adding this to `Deployment.spec.template.spec.containers`
238
238
```
239
239
securityContext:
240
240
capabilities:
241
241
add:
242
242
- SYS_PTRACE
243
243
```
244
244
More details on this here: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-capabilities-for-a-container
245
-
Note that this will remove the existing pods and create those again.
245
+
Note that if you modify the Deployment resource, this will remove the existing Pods and create those again.
246
+
247
+
You can also create an **ephemeral container** to attach to a running Pod, targeting a specific **container** where your application is running.
248
+
Make sure to use a `profile` that grants the `SYS_PTRACE` permission, for example:
0 commit comments