K8s Service Types
ClusterIP
The default and most common type. It creates a virtual IP inside the cluster that acts as a single connection point for a group of Pods, often used for internal round-robin load balancing.
NodePort
The NodePort service type builds on ClusterIP by opening a port (typically in the 30000–32767 range) on every node and mapping it to the Service. This allows basic external traffic to reach the cluster through any node.
LoadBalancer
The LoadBalancer service type extends NodePort by provisioning an external load balancer. This requires an environment that supports automated load balancer creation, such as AWS, GCP, Azure, or OpenStack.
ExternalName
A special service type that has no routing whatsoever. ExternalName creates a DNS alias rather than routing traffic. The Service maps a name inside the cluster to an external hostname, which is useful when internal workloads need to access external services without handling complex DNS names.