Service Types in Kubernetes¶
In Kubernetes, there are several different types of services that can be used to make your application accessible to other parts of your cluster or to external users.
Here are the Service types available in kubernetes:
ClusterIpNodePortLoadBalancerExternalName
1. ClusterIp Service¶
ClusterIPexposes the service on a cluster-internal IP.- Choosing this value makes the service only reachable from within the cluster.
- This is the default value if you don't explicitly specify a type for a service.
ClusterIPservie can be accessed as<clusterIP>:<service-port>
2. NodePort Service¶
NodePortexposes the service on each Node's IP at a static port (theNodePort).NodePortservice can be accessed as<NodeIp>:<nodePort>
3. LoadBalancer Service¶
LoadBalancerexposes the service externally using a cloud provider's load balancer.- For example AWS Application Load Balancer (ALB)
LoadBalancerservice can be accessed using Load balancer URL
4. ExternalName Service¶
- An
ExternalNameservice is a special case of service that does not haveselectors. - It does not define any ports or endpoints.
- It serves as a way to return an alias to an external service residing outside the cluster.



