0 votes
in Kubernetes K8s by
How do I expose a service to a host outside the cluster?

1 Answer

0 votes
by
There are two ways by which we can expose a service to host outside the cluster:

1) Service type should be set to NodePort. Every node in the cluster will be made to listen on the specified NodePort, then all the traffic from any node will be forwarded from that NodePort to a random pod in the service.

2) Service type should be set to Load Balancer mode. Nodeport will be provisioned as mentioned in the above step, and then additional step which will automatically provision the load balancer in the cloud infrastructure.

Related questions

0 votes
asked Jul 22, 2020 in JavaScript by Hodge
0 votes
asked Apr 5, 2020 in DevOps by ryan harris
...