Member-only story

Kubernetes Type of Services

Luca Berton
7 min readOct 18, 2024

In Kubernetes, Services are responsible for exposing a set of Pods to the network, whether internal to the cluster or external to the world. Kubernetes offers different types of Services to route traffic depending on how you want to expose your application. These types are:

  1. ClusterIP (default)
  2. NodePort
  3. LoadBalancer
  4. ExternalName (less commonly used)

Each Service type serves a specific use case. Let’s go over each one in detail:

1. ClusterIP (default)

The ClusterIP service is the default type in Kubernetes and is used to expose a Service internally within the cluster. This means that the service is assigned an IP address (ClusterIP) that is only reachable from within the Kubernetes cluster, not from outside the cluster.

Use Case:

  • This type is ideal for internal communication between microservices within the same cluster, such as backend services (e.g., databases or APIs) that don’t need to be exposed to the public internet.

How It Works:

  • Kubernetes assigns a virtual ClusterIP that other Pods inside the cluster can access.
  • External clients cannot access this IP.

--

--

Luca Berton
Luca Berton

Written by Luca Berton

I help creative Automation DevOps, Cloud Engineer, System Administrator, and IT Professional to succeed with Ansible Technology to automate more things everyday

No responses yet