kubectl debug web-0-f449b476d-w95ms -n kube-system -a
Agent Pod info: [Name:debug-agent-pod-9917540e-cc0c-11ea-912f-005056872b09, Namespace:default, Image:aylei/debug-agent:latest, HostPort:10027, ContainerPort:10027]
Waiting for pod debug-agent-pod-9917540e-cc0c-11ea-912f-005056872b09 to run...
pulling image nicolaka/netshoot:latest...
latest: Pulling from nicolaka/netshoot
Digest: sha256:04786602e5a9463f40da65aea06fe5a825425c7df53b307daa21f828cfe40bf8
Status: Image is up to date for nicolaka/netshoot:latest
starting debug container...
container created, open tty...
bash-5.0# pwd
/
bash-5.0# cd /root/
bash-5.0# pwd
/root
bash-5.0# cd /opt/
bash-5.0# ls
bash-5.0# pwd
/opt
bash-5.0# ls
Exec -it can see this file
You can't see this file with Debug