concept
Service DNS and headless discovery
Normal Service DNS records point to the virtual IP; headless records identify endpoints; ExternalName provides a DNS alias without proxying.
Formal Syntax & Structure
kubernetes syntaxkubernetes
Service DNS and headless discoveryWorking Example
Example Snippetkubernetes
apiVersion: v1kind: Servicemetadata: name: api-peers namespace: book-labspec: clusterIP: None selector: app: api ports: - name: http port: 8080 targetPort: 8080