Pod stuck in CrashLoopBackOff when trying to bind a port lower than 1024 even with CAP_NET_BIND_SERVICE
Issue
- By default unprivileged pods can't bind any port lower than 1024, causing them to enter in
CrashLoopBackOff. - Adding capability NET_BIND_SERVICE to the container doesn't have any effect, and application still fails to bind any port lower than 1024.
- How to bind any port on unprivileged pods?
Environment
Red Hat OpenShift Container Platform 4.8+
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.