aylei / aylei/kubectl-debug

I copied a file into pod and put it under /opt. You can see it with exEC-it, but you can't see it with debug.

Open
#116 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.3k
Forks
303
PR merge metrics
No merged PRs in 30d

Description

Exec -it can see this file
```
root@web-0-f449b476d-w95ms:/opt# ls
dns-test

```

You can't see this file with Debug
```
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
```

Contributor guide

No contributing guide indexed for this repository

Research direction

No source file or test is named. Start by reproducing the `kubectl exec` and `kubectl debug` commands against the same pod, then inspect how the debug container is created and what filesystem it shares. Done means the differing `/opt` views are explained and the issue is fixed or clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
cli, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.