Skip to main content

Service_Types

Service Types

Service types can be specified as an argument to the kubectl expose command or inside of a Service specification.

  • ClusterIP: The default type which provides only internal access.
  • NodePort: Great for debugging or when static IP is necessary.
  • LoadBalancer: The LoadBalancer service was created to pass requests to a cloud provider like GKE or AWS. Private cloud solutions also may implement this service type if there is a cloud provider plugin, such as with CloudStack and OpenStack. Even without a cloud provider, the address is made available to public traffic, and packets are spread among the Pods in the deployment automatically.
  • ExternalName: It has no selectors, nor does it define ports or endpoints. It allows the return of an alias to an external service. The redirection happens at the DNS level, not via a proxy or forward.

The kubectl proxy command creates a local service to access a ClusterIP. This can be useful for troubleshooting or development work.