-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
minikube preload tarballs need to preserve extended attributes such as capabilities #17804
Comments
The workaround to run |
This issue only affects containerd and cri-o (and any other container runtime, except for docker), because of: sysctl |
Both containerd and cri-o have configuration to enable binding to ports below 1024, but it is off by default. Docker has it on, since 20.10: moby/moby@dae652e adds containerd
crio
|
Hey sir, thank you very much for sharing ur knowledge, this was very helpful and fixed the issue that I was having. I made the change on the kernel settings and containerd settings and restart the services and it worked. 🥳 cat /etc/sysctl.conf |egrep -i net.ipv4.ip_unprivileged_port_start
-> net.ipv4.ip_unprivileged_port_start = 0
sysctl -f /etc/sysctl.conf
cat /etc/containerd/config.toml | egrep -i enable_unprivileged_ports
-> enable_unprivileged_ports = true
systemctl stop containerd && systemctl start containerd
systemctl stop kubelet && systemctl start kubelet |
The coredns version included with Kubernetes 1.29.0, that is coredns v1.11.1, now requires capabilities:
So when you run coredns from that image (in the preload), it does not have the capability to listen below 1024:
Listen: listen tcp :53: bind: permission denied
coredns/coredns@d21537f
We need to make sure to include the extended attributes in the tarball, and to extract them again (requires root)
--xattrs --xattrs-include=security.capability
Then the capabilities gets included in the tarball, under a special header called "SCHILY.xattr.security.capability"
It requires a reasonable new tar version, like 1.27+
The text was updated successfully, but these errors were encountered: