-
Bug
-
Resolution: Won't Do
-
Normal
-
None
-
4.13.z, 4.12.z, 4.11.z
-
Important
-
No
-
False
-
Description of problem:
OpenShift didn't check the hostPort usage before creating a nodePort for a same port. Neither our document mentioned user should avoid overlapping with OCP default ports[1] This would allow user creating a nodePort overlapping with an existing hostPort by accident. [1] - https://github.com/openshift/enhancements/blob/master/dev-guide/host-port-registry.md
Steps to Reproduce:
1. Expand the node port range to 9000-32767 [1] 2. Create any example pod and a NodePort using 9101 which should be already used by openshift-sdn pod as a hostPort. 3. Curl the nodeIp:9101. It's connect to our example pod, instead of openshift-sdn
Actual results:
User's nodePort will conflict with OpenShift default ports. Causing networking trouble.
Expected results:
OCP should not allow user to expand the node port overlapping with default ports. Or, scheduler or controller-manager should detect the hostPort usage before creating a nodePort
Additional info: