Skip to content

Commit fa890d9

Browse files
authored
Merge pull request #28146 from chuntaochen/feature/translate_nameResolution
[zh]Translate DNS name resolution : synchronize with en doc
2 parents 1b09f57 + 091a926 commit fa890d9

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

content/zh/docs/tasks/administer-cluster/dns-debugging-resolution.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ kube-dns.
3030
<!--
3131
### Create a simple Pod to use as a test environment
3232
33+
{{< codenew file="admin/dns/dnsutils.yaml" >}}
34+
35+
{{< note >}}
36+
This example creates a pod in the `default` namespace. DNS name resolution for
37+
services depends on the namespace of the pod. For more information, review
38+
[DNS for Services and Pods](/docs/concepts/services-networking/dns-pod-service/#what-things-get-dns-names).
39+
{{< /note >}}
3340
3441
Use that manifest to create a Pod:
3542
@@ -46,6 +53,11 @@ busybox 1/1 Running 0 <some-time>
4653

4754
{{< codenew file="admin/dns/dnsutils.yaml" >}}
4855

56+
{{< note >}}
57+
此示例在 `default` 命名空间创建 pod。 服务的 DNS 名字解析取决于 pod 的命名空间。 详细信息请查阅
58+
[服务和 Pod 的 DNS](/zh/docs/concepts/services-networking/dns-pod-service/#what-things-get-dns-names)
59+
{{< /note >}}
60+
4961
使用上面的清单来创建一个 Pod:
5062

5163
```shell
@@ -364,6 +376,49 @@ linux/amd64, go1.10.3, 2e322f6
364376

365377
```
366378

379+
<!--
380+
### Are you in the right namespace for the service?
381+
382+
DNS queries that don't specify a namespace are limited to the pod's
383+
namespace.
384+
385+
If the namespace of the pod and service differ, the DNS query must include
386+
the namespace of the service.
387+
388+
This query is limited to the pod's namespace:
389+
```shell
390+
kubectl exec -i -t dnsutils -- nslookup <service-name>
391+
```
392+
-->
393+
### 你的服务在正确的命名空间中吗?
394+
395+
未指定命名空间的 DNS 查询仅作用于 pod 所在的命名空间。
396+
397+
如果 pod 和服务的命名空间不相同,则 DNS 查询必须指定服务所在的命名空间。
398+
399+
该查询仅限于 pod 所在的名称空间:
400+
```shell
401+
kubectl exec -i -t dnsutils -- nslookup <service-name>
402+
```
403+
404+
<!--
405+
This query specifies the namespace:
406+
```shell
407+
kubectl exec -i -t dnsutils -- nslookup <service-name>.<namespace>
408+
```
409+
-->
410+
指定命名空间的查询:
411+
```shell
412+
kubectl exec -i -t dnsutils -- nslookup <service-name>.<namespace>
413+
```
414+
415+
<!--
416+
To learn more about name resolution, see
417+
[DNS for Services and Pods](/docs/concepts/services-networking/dns-pod-service/#what-things-get-dns-names).
418+
-->
419+
要进一步了解名字解析,请查看
420+
[服务和 Pod 的 DNS](/zh/docs/concepts/services-networking/dns-pod-service/#what-things-get-dns-names)
421+
367422
<!--
368423
## Known issues
369424

0 commit comments

Comments
 (0)