In Kubernetes, a Service is a method for exposing a network application in the cluster. We use a Service to make that set of Pods available on the network so that users can interacts with it.
There are 4 types of Kubernetes services:
ClusterIP:
CluserterIP is the default and most common service type. Kubernetes will assign a cluster-internal IP address to clusterIP service. This makes the service only reachable within the cluster.
NodePort :
This exposes the service outside of the clusterby adding a cluster-wide port on top of ClusterIP. We can request the service by NodeIP:NodePort.
LoadBalancer:
This exposes the Services externally using a cloud provider ' s load balancer.
ExternalName:
this maps a Service yo a domain name. This is commonly used to create a service within kubernetes to represent an external database.