Service

A service enable communication between components inside/outside of the cluster. For example a service can be used to connect the front-end to the end users and other to connect the back-end to an external data source.

There are different type of services available in Kubernetes:

Links to this page
  • NodePort

    Service which listens to a port in the Kubernetes cluster and forwards external traffic to an internal pod. External ports are between 30000-32767 range.

  • LoadBalancer

    A LoadBalancer provides a external IP adress and routes al the traffic to a Service in the cluster. Usually, you have to pay per LoadBalancer in the different cloud platforms. That’s why the LoadBalancer is used to connect all the traffic to the cluster Ingress.

  • Ingress

    Ingress is an API to manage external access to every Service in the cluster. It manages and proxies your request to the applications in the cluster based on the URL of the request.

  • ClusterIP

    Service which connect and manage internal traffic between components referring to a virtual ip instead of each single pod ip. For example we have 3 pods for front-end and 3 for back-end. FE wants to communicate with BE, so FE uses the cluster ip and kubernetes decides to which pod send the request.

#networking #kubernetes