root@k8scp:/proc/1328/cwd# ls -l /proc/1328/cwd
lrwxrwxrwx 1 root root 0 Jan 30 09:44 /proc/1328/cwd -> /
I looks like cwd
is a symlink to the rhttps://serverfault.com/questions/1091636/containerd-proc-pid-cwd-is-a-symlink-to-but-thats-not-the-root-dir-of-the-noot directory.
Pid 1328 is a container of containerd of a kubernetes master node.
root@k8scp:~# grep PRETTY /etc/os-release /proc/1328/cwd/etc/os-release
/etc/os-release:PRETTY_NAME="Ubuntu 20.04.3 LTS"
/proc/1328/cwd/etc/os-release:PRETTY_NAME="Distroless"
This confuses me, since this means that /proc/1328/cwd
is not a normal symlink, but
a magic thing pointing to the root directory of the container.
How can this be explained.
Up to now I thought a symlink is just a string which can be valid (or an sometimes invalid) path.