I have 1 master and 2 worker on my k8s cluster.It's bare metal and I can't use any of cloud providers. I just can use DNS load balancer. I want to expose valid ports (like 80 and 443) on my nodes because of that I can't use NodePort. What is the best solution?
My only solution was to install Nginx on all of my nodes and proxy ports to my ClusterIp services.I don't know that this is a good solution or not.
I found the solution. I need to edit /etc/kubernetes/manifests/kube-apiserver.yaml
and edit service-node-port-range
to 80 to any number that I want. Then declare my ingress service as nodePort
.
Following things that you are doing right :
Following things that you can do: