@@ -4,15 +4,22 @@ content_type: task
4
4
min-kubernetes-server-version : v1.6
5
5
weight : 170
6
6
---
7
+ <!--
8
+ reviewers:
9
+ - bowei
10
+ - zihongz
11
+ title: Debugging DNS Resolution
12
+ content_type: task
13
+ min-kubernetes-server-version: v1.6
14
+ weight: 170
15
+ -->
7
16
8
17
<!-- overview -->
9
18
<!--
10
19
This page provides hints on diagnosing DNS problems.
11
20
-->
12
21
这篇文章提供了一些关于 DNS 问题诊断的方法。
13
22
14
- <!-- steps -->
15
-
16
23
## {{% heading "prerequisites" %}}
17
24
18
25
{{< include "task-tutorial-prereqs.md" >}}
@@ -28,6 +35,8 @@ kube-dns.
28
35
29
36
{{< version-check >}}
30
37
38
+ <!-- steps -->
39
+
31
40
<!--
32
41
### Create a simple Pod to use as a test environment
33
42
@@ -40,17 +49,8 @@ services depends on the namespace of the pod. For more information, review
40
49
{{< /note >}}
41
50
42
51
Use that manifest to create a Pod:
43
-
44
- ```shell
45
- kubectl create -f https://k8s.io/examples/admin/dns/busybox.yaml
46
- pod/busybox created
47
-
48
- kubectl get pods busybox
49
- NAME READY STATUS RESTARTS AGE
50
- busybox 1/1 Running 0 <some-time>
51
- ```
52
52
-->
53
- ### 创建一个简单的 Pod 作为测试环境
53
+ ### 创建一个简单的 Pod 作为测试环境 {#create-a-simple-pod-to-use-as-a-test-environment}
54
54
55
55
{{< codenew file="admin/dns/dnsutils.yaml" >}}
56
56
@@ -117,7 +117,7 @@ Take a look inside the resolv.conf file.
117
117
(See [Customizing DNS Service](/docs/tasks/administer-cluster/dns-custom-nameservers) and
118
118
[Known issues](#known-issues) below for more information)
119
119
-->
120
- ### 先检查本地的 DNS 配置
120
+ ### 先检查本地的 DNS 配置 {#check-the-local-dns-configuration-first}
121
121
122
122
查看 resolv.conf 文件的内容
123
123
(阅读[ 定制 DNS 服务] ( /zh-cn/docs/tasks/administer-cluster/dns-custom-nameservers/ ) 和
@@ -405,7 +405,7 @@ term_id="endpoint" >}} related resources to properly resolve service names.
405
405
406
406
Sample error message:
407
407
-->
408
- ### CoreDNS 是否有足够的权限?
408
+ ### CoreDNS 是否有足够的权限? {#does-coredns-have-sufficient-permissions}
409
409
410
410
CoreDNS 必须能够列出 {{< glossary_tooltip text="service" term_id="service" >}} 和
411
411
{{< glossary_tooltip text="endpoint" term_id="endpoint" >}} 相关的资源来正确解析服务名称。
@@ -476,7 +476,7 @@ the namespace of the service.
476
476
477
477
This query is limited to the pod's namespace:
478
478
-->
479
- ### 你的服务在正确的名字空间中吗?
479
+ ### 你的服务在正确的名字空间中吗? {#are-you-in-the-right-namespace-for-the-service}
480
480
481
481
未指定名字空间的 DNS 查询仅作用于 Pod 所在的名字空间。
482
482
0 commit comments