DevOpsLesson
DevOpsLesson

Free, comprehensive DevOps tutorials and learning roadmaps. Master Docker, Kubernetes, CI/CD, and more.

Stay Updated

Get notified about new tutorials and features.

Tutorials

  • What is DevOps?
  • Docker Tutorial
  • Terraform Tutorial
  • CI/CD Pipeline
  • All Tutorials

Roadmaps

  • DevOps Engineer
  • Cloud Engineer
  • SRE Path
  • All Roadmaps

Company

  • About Us
  • Blog
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 DevOpsLesson. All rights reserved.

DOCKERKUBERNETESTERRAFORMAWSCI/CDLINUXGITDEVOPS ROADMAPCLOUD ROADMAPSRE ROADMAPGIT CHEATSHEETDOCKER CHEATSHEETK8S CHEATSHEETTF CHEATSHEETLINUX CHEATSHEETDOCKERFILE LINTERYAML VALIDATORCRON PARSERREGEX TESTER

Kubernetes Tutorial

Introduction to Kubernetes
Kubernetes Architecture
Installing Kubernetes
kubectl Basics
Kubernetes Pods
Kubernetes Deployments
Kubernetes Services
ConfigMaps and Secrets
Kubernetes Storage
Kubernetes Namespaces
Kubernetes Resource Management
Helm for Kubernetes
Kubernetes Monitoring

Kubernetes Service: ClusterIP

PreviousPrev
Next

Learn the default internal Service type, when to use it, and how DNS and endpoints make in-cluster communication reliable.

What Is ClusterIP?

ClusterIP is the default Service type in Kubernetes. It exposes a stable virtual IP that is reachable only inside the cluster.

When to Use It

ClusterIP is ideal for:

  • frontend to backend communication
  • API to database communication
  • internal microservice traffic

Full YAML Example

apiVersion: v1
kind: Service
metadata:
  name: backend
spec:
  selector:
    app: backend
  ports:
    - port: 80
      targetPort: 8080
  type: ClusterIP

DNS Name Format

Inside the cluster, the full DNS name looks like this:

backend.default.svc.cluster.local

The short name backend often works inside the same namespace.

Inspect the Service

kubectl get svc
kubectl get endpoints backend

If the endpoints list is empty, the Service selector probably does not match any ready pods.

Why ClusterIP Is the Default

Most services in Kubernetes talk to each other internally. ClusterIP supports that use case without exposing anything publicly.

Think of ClusterIP like an internal office extension number. People inside the building can call it, but outside callers cannot.

Exercise

Reachability

Who can normally reach a ClusterIP Service?

Exercise

Empty Endpoints

If `kubectl get endpoints backend` shows no addresses, what is a likely cause?

PreviousPrev
Next

Continue Learning

Kubernetes Rolling Updates

Learn how Deployments replace old pods gradually, what maxSurge and maxUnavailable do, and how old ReplicaSets support safe transitions.

20 min·Easy

Kubernetes Rollbacks

Inspect Deployment revision history, undo rollouts, annotate change causes, and pause or resume updates safely.

18 min·Easy

Kubernetes Services

Understand why Services exist, how selectors connect them to pods, and how stable networking hides pod churn.

16 min·Easy

Explore Related Topics

Do

Docker Tutorials

Build the containers Kubernetes orchestrates

Te

Terraform Tutorials

Provision Kubernetes clusters as code

Try the Tool

YAML Validator

Validate Kubernetes manifests and any YAML files instantly.

On This Page

What Is ClusterIP?When to Use ItFull YAML ExampleDNS Name FormatInspect the ServiceWhy ClusterIP Is the Default