Debug School

Ankita Goyal
Ankita Goyal

Posted on

Services- Ankita

There are 3 types of services:

  1. Cluster IP which is the default service
  2. NodePort
  3. LoadBalancer : we need two of these , one for the nodes and one for the pods.

How it works:
End user hits the domain which hits the load balancer via DNS, the load balancer in turn hits the front end pod via node which then hits the backend service inside the cluster , which can provide access to the back end pod .

Commands:
kubectl create svc clusterip name --tcp=49284:80
kubectl create svc nodeport name --tcp=49284:80
kubectl create svc loadbalancer name --tcp=49284:80

The selector label of service should match with the pods for the pods ip to be included in the endpoints.

Top comments (0)