Course contentsShow
← Cloud and Infrastructure
Lesson 1209 of 2,98924. Kubernetes NetworkingFree lesson

ExternalName Services

Creating Service aliases that return CNAME records for external DNS names.

ExternalName Services

What You'll Learn

You'll learn how to create a Kubernetes Service that acts as a simple DNS alias, pointing to an external service outside your cluster using CNAME records.

The Core Concept

An ExternalName Service is a special type of Kubernetes Service that doesn't route traffic to Pods like ClusterIP, NodePort, or LoadBalancer Services do. Instead, it returns a DNS CNAME (Canonical Name) record that redirects requests to an external DNS name you specify.

Think of it as a phonebook entry that says "Call Bob? Actually, call Alice instead—she's handling Bob's calls now." When your application asks Kubernetes DNS for my-database, the ExternalName Service responds with "Look up prod-db.external-company.com instead."

Why Use ExternalName Services?

This is useful when you want to:

  • Reference external databases, APIs, or services by a consistent internal name
  • Migrate workloads gradually (point to external service now, internal Pods later)
  • Abstract external dependencies behind Kubernetes-native service names

How It Works

When you create an ExternalName Service, you define an externalName field with the external DNS name. Kubernetes DNS intercepts queries for your Service name and returns a CNAME pointing to that external address. No proxying happens—your application simply gets redirected at the DNS level.

Key Takeaway:
ExternalName Services create DNS aliases that redirect service lookups to external DNS names via CNAME records, enabling seamless integration of external resources into your Kubernetes service discovery without routing traffic through the cluster.