Example Documentation: ExternalName Service Discovery
Goal
Use a stable internal Service name for an external DNS target.
What Is Done
An ExternalName Service points to kubernetes.io. A client Pod can resolve the internal name docs-service.
Typical Commands
kubectl apply -f manifests/
kubectl get svc -n externalname-lab
kubectl exec -n externalname-lab deploy/dns-client -- nslookup docs-service
Validate Success
- The Service has type
ExternalName. externalNamepoints tokubernetes.io.- The client can resolve
docs-servicethrough DNS.
Common Mistakes
- ExternalName is expected to behave like a ClusterIP Service.
- Applications expect IPs instead of CNAME resolution.
- Network or DNS policies block external resolution.