clusterIP

ClusterIP is one of the fundamental Service types in Kubernetes (the default one, in fact). It provides a stable, internal virtual IP address (often called the “Cluster IP”) that allows reliable communication only within the Kubernetes cluster — never directly from outside.

Key characteristics of a ClusterIP Service

When do you use ClusterIP? (most common use case)

Quick comparison with other Service types

Service TypeAccessibilityGets a public/external IP?Typical use case
ClusterIPOnly inside the clusterNoInternal microservices, databases, queues
NodePortCluster + external via node IP + high port (30000–32767)Indirectly (via nodes)Quick external testing/debugging
LoadBalancerExternal via cloud LB IPYes (provisioned by cloud)Public-facing web apps, APIs
ExternalNameMaps to external DNSN/APoint to AWS RDS, external SaaS

Simple example YAML

apiVersion: v1
kind: Service
metadata:
  name: my-backend
spec:
  selector:
    app: backend
  ports:
    - protocol: TCP
      port: 80          # what clients connect to
      targetPort: 8080  # what the Pods listen on
  type: ClusterIP       # this is actually the default — you can omit it

After applying this:

Headless variation (special case)

If you set clusterIP: None in the spec, you get a headless ClusterIP Service:

In short: ClusterIP = the safe, default way to let things inside your Kubernetes cluster talk to each other reliably, without ever exposing them to the outside world. It’s a cornerstone of secure, internal service communication in production Kubernetes deployments.