Why is there no nerdctl0 network interface on host in rootless mode #2053
-
Hi everyone, CNI config
Although the cni config enables the bridge to act as a gateway
However in rootful mode I can see nerdctl0 network interface on the host. Trying to make sense of how the connection is made from the host to the container. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
$ containerd-rootless-setuptool.sh nsenter -- ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: tap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 65520 qdisc pfifo_fast state UP group default qlen 1000
link/ether b2:eb:29:26:a2:c7 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.100/24 scope global tap0
valid_lft forever preferred_lft forever
inet6 fe80::b0eb:29ff:fe26:a2c7/64 scope link
valid_lft forever preferred_lft forever
3: nerdctl0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether a6:3b:04:94:f8:51 brd ff:ff:ff:ff:ff:ff
inet 10.4.0.1/24 brd 10.4.0.255 scope global nerdctl0
valid_lft forever preferred_lft forever
inet6 fe80::a43b:4ff:fe94:f851/64 scope link
valid_lft forever preferred_lft forever
4: veth85843e25@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master nerdctl0 state UP group default
link/ether a6:d9:35:92:44:77 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet6 fe80::a4d9:35ff:fe92:4477/64 scope link
valid_lft forever preferred_lft forever eth0 (in the container's netns) → vethXXX (in RootlessKit's netns) → nerdctl0 (in RootlessKit's netns) → tap0 (in RootlessKit's netns) → slirp4netns → e.g., etc0 (in the host's netns) See also https://github.com/rootless-containers/slirp4netns/ https://github.com/rootless-containers/rootlesskit |
Beta Was this translation helpful? Give feedback.
nerdctl0
is namespaced, as a non-root user can't gain the privilege to createnerdctl
in the host netns