Types of services

In this section, we will have a look at the most important service types. Services differ by how they handle traffic and whether they expose Pods externally or internally. The services we will discuss are as follows:

  • ClusterIP
  • NodePort
  • LoadBalancer
  • ExternalName

Let's discuss each service in detail:

  • ClusterIP: This is a default service that uses an internal ClusterIP to expose Pods. This means that services are not available from outside of the cluster. The use case for ClusterIP is internal communication between microservices within the cluster:

The following is a sample definition of a Service of the ClusterIP type: ...

Get Professional Cloud Architect - Google Cloud Certification Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.