some question about use strace inside container
i need to use strace for debug and i have ask how to set SYS_PTRACE for debug container? like that: securityContext: capabilities: add: - SYS_PTRACE # <-- the privilege thx
https://github.com/aylei/kubectl-debug/blob/8fbb788cce08988bf14112e54f578b3017a25e27/pkg/agent/runtime.go#L166
The debug container has SYS_PTRACE capability added already, did you hit a problem about this?
yes
bash-5.0# ps aux PID USER TIME COMMAND 1 nobody 1d12 /usr/local/bin/binary -c=/config/phpr.toml 31 root 0:00 bash 37 root 0:00 ps aux
bash-5.0# strace -p 1 strace: test_ptrace_get_syscall_info: PTRACE_TRACEME: Operation not permitted strace: attach: ptrace(PTRACE_ATTACH, 1): Operation not permitted
what's the output of kubectl debug --version?
~/kuber-fdb » kubectl-debug --version
debug version v0.0.0-master+$Format:%h$
@3JIou I see, let me try to reproduce
@3JIou Could you try out v0.2.0-rc?