Merge pull request #49601 from davidxia/patch4

docs: add an example of a Service-scoped Pod DNS record
pull/51661/head
Kubernetes Prow Robot 2025-07-19 17:38:25 -07:00 committed by GitHub
commit 10000df900
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 1 deletions

View File

@ -105,7 +105,7 @@ Kube-DNS versions, prior to the implementation of the
had the following DNS resolution:
```
pod-ipv4-address.my-namespace.pod.cluster-domain.example
<pod-IPv4-address>.<namespace>.pod.<cluster-domain>
```
For example, if a Pod in the `default` namespace has the IP address 172.17.0.3,
@ -121,6 +121,14 @@ Some cluster DNS mechanisms, like [CoreDNS](https://coredns.io/), also provide `
<pod-ipv4-address>.<service-name>.<my-namespace>.svc.<cluster-domain.example>
```
For example, if a Pod in the `cafe` namespace has the IP address 172.17.0.3,
is an endpoint of a Service named `barista`, and the domain name for your cluster is
`cluster.local`, then the Pod would have this service-scoped DNS `A` record.
```
172-17-0-3.barista.cafe.svc.cluster.local
```
### Pod's hostname and subdomain fields
Currently when a Pod is created, its hostname (as observed from within the Pod)