How do I expose a service to a host outside the cluster?

0 votes
I want to make a service available to a host that is not in the kubernetes cluster?
Jul 12 in Kubernetes by Sam
• 4,320 points
46 views

1 answer to this question.

0 votes

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.

answered Jul 12 by Sirajul
• 39,540 points

Related Questions In Kubernetes

0 votes
1 answer

How do I create a service account for my dashboard and get all the credentails

Run the following commands: This command will create ...READ MORE

answered Oct 8, 2018 in Kubernetes by Kalgi
• 42,510 points
307 views
0 votes
1 answer

How to start and stop a cluster on AWS using kops without stopping the instance

Export your KOPS_STAT_STORE variable export KOPS_STATE_STORE=s3://your-bucket-name Get your instances ...READ MORE

answered Jan 8 in Kubernetes by Kashish
1,300 views
0 votes
1 answer
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17 in Others by anonymous
3,104 views
+3 votes
1 answer
0 votes
1 answer

How do i tie a service to a pod or a set of pods?

By declaring pods with the label(s) and ...READ MORE

answered Jul 16 in Kubernetes by Sirajul
• 39,540 points
40 views