I want to have MySQL as service by kubernetes. Any one that create database I should create a service for it and if he want to access database I should use NodePort. but I have 2000 port and I have 4000 user. I install kubernetes in baremetal. What should I do? Why kubernetes have limited NodePort?
The default range is 30000-32767, so you actually have slightly more than 2000 by default. That range was picked to avoid conflicts with anything else on the host machine network, but you can change the range yourself if somehow you need more. Though I would be very worried about having that many nodeport services.
@check nova
Kubernetes does not have limited NodePort port range value. The default range is indeed 30000-32767 but it can be changed by setting the
--service-node-port-range
Update the file /etc/kubernetes/manifests/kube-apiserver.yaml and add the line --service-node-port-range=xxxxx-yyyyy
Be careful however and try not to generate any configuration conflicts for your network.
I hope it helps.