-runtime-root 默认值是/run/containerd/runc/${namespace} root directory for storage of container state
-socket shim监听的端口,默认值是 fd[3],代表从父进程继承的。
-workdir path used to storge large temporary data
containerd-shim 4079 779 0 /usr/bin/containerd-shim-runc-v2 -namespace k8s.io -address /run/containerd/containerd.sock -publish-binary /usr/bin/containerd -id b08e95eea16c75f85d01d0373eb1e790f5fd4a1aaa692a4bc08533a0d6cbf247 start
containerd-shim 4086 4079 0 /usr/bin/containerd-shim-runc-v2 -namespace k8s.io -id b08e95eea16c75f85d01d0373eb1e790f5fd4a1aaa692a4bc08533a0d6cbf247 -address /run/containerd/containerd.sock
�
runtime/v2/shim/shim.go
run
-> address, err := service.StartShim(ctx, opts) 再fork一个containerd-shim-runc-v2子进程
-> os.Stdout.WriteString(address) 这个address就是containerd-shim-runc-v2子进程监听的地址,也写到了/run/containerd/io.containerd.runtime.v2.task/k8s.io/b08e95eea16c75f85d01d0373eb1e790f5fd4a1aaa692a4bc08533a0d6cbf247/address文件中。
�