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
| legacy | A set of properties backwards compatibility with 1.22 behavior |
656
+
| general | A reasonable set of generic properties for each debugging journey |
657
+
| baseline | A set of properties compatible with [PodSecurityStandard baseline policy](/docs/concepts/security/pod-security-standards/#baseline)|
658
+
| restricted | A set of properties compatible with [PodSecurityStandard restricted policy](/docs/concepts/security/pod-security-standards/#restricted)|
659
+
| netadmin | A set of properties including Network Administrator privileges |
660
+
| sysadmin | A set of properties including System Administrator (root) privileges |
661
+
662
+
663
+
{{< note >}}
664
+
If you don't specify `--profile`, the `legacy` profile is used by default, but it is planned to be deprecated in the near future.
665
+
So it is recommended to use other profiles such as `general`.
666
+
{{< /note >}}
667
+
668
+
669
+
Assume that you create a Pod and debug it.
670
+
First, create a Pod named `myapp` as an example:
671
+
672
+
```shell
673
+
kubectl run myapp --image=busybox:1.28 --restart=Never -- sleep 1d
674
+
```
675
+
676
+
Then, debug the Pod using an ephemeral container.
677
+
If the ephemeral container needs to have privilege, you can use the `sysadmin` profile:
Copy file name to clipboardExpand all lines: content/en/docs/tasks/debug/debug-cluster/kubectl-node-debug.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,8 @@ When creating a debugging session on a Node, keep in mind that:
75
75
* Although the container runs in the host IPC, Network, and PID namespaces,
76
76
the pod isn't privileged. This means that reading some process information might fail
77
77
because access to that information is restricted to superusers. For example, `chroot /host` will fail.
78
-
If you need a privileged pod, create it manually.
78
+
If you need a privileged pod, create it manually or use the `--profile=sysadmin` flag.
79
+
* By applying [Debugging Profiles](/docs/tasks/debug/debug-application/debug-running-pod/#debugging-profiles), you can set specific properties such as [securityContext](/docs/tasks/configure-pod-container/security-context/) to a debugging Pod.
0 commit comments