Skip to content

Commit 7196958

Browse files
committed
[zh] update dns-debugging-resolution.md
1 parent 863ea4d commit 7196958

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

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

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ Your cluster must be configured to use the CoreDNS
2929
{{< glossary_tooltip text="addon" term_id="addons" >}} or its precursor,
3030
kube-dns.
3131
-->
32-
3332
你的集群必须使用了 CoreDNS {{< glossary_tooltip text="插件" term_id="addons" >}}
3433
或者其前身,`kube-dns`
3534

@@ -39,27 +38,25 @@ kube-dns.
3938

4039
<!--
4140
### Create a simple Pod to use as a test environment
42-
43-
{{% code_sample file="admin/dns/dnsutils.yaml" %}}
44-
45-
{{< note >}}
46-
This example creates a pod in the `default` namespace. DNS name resolution for
47-
services depends on the namespace of the pod. For more information, review
48-
[DNS for Services and Pods](/docs/concepts/services-networking/dns-pod-service/#what-things-get-dns-names).
49-
{{< /note >}}
50-
51-
Use that manifest to create a Pod:
5241
-->
5342
### 创建一个简单的 Pod 作为测试环境 {#create-a-simple-pod-to-use-as-a-test-environment}
5443

5544
{{< codenew file="admin/dns/dnsutils.yaml" >}}
5645

5746
{{< note >}}
47+
<!--
48+
This example creates a pod in the `default` namespace. DNS name resolution for
49+
services depends on the namespace of the pod. For more information, review
50+
[DNS for Services and Pods](/docs/concepts/services-networking/dns-pod-service/#what-things-get-dns-names).
51+
-->
5852
此示例在 `default` 名字空间创建 Pod。
5953
服务的 DNS 名字解析取决于 Pod 的名字空间。
6054
详细信息请查阅 [Pod 与 Service 的 DNS](/zh-cn/docs/concepts/services-networking/dns-pod-service/#what-things-get-dns-names)
6155
{{< /note >}}
6256

57+
<!--
58+
Use that manifest to create a Pod:
59+
-->
6360
使用上面的清单来创建一个 Pod:
6461

6562
```shell
@@ -121,7 +118,7 @@ Take a look inside the resolv.conf file.
121118

122119
查看 resolv.conf 文件的内容
123120
(阅读[定制 DNS 服务](/zh-cn/docs/tasks/administer-cluster/dns-custom-nameservers/)
124-
后文的[已知问题](#known-issues) ,获取更多信息)
121+
后文的[已知问题](#known-issues) ,获取更多信息
125122

126123
```shell
127124
kubectl exec -ti dnsutils -- cat /etc/resolv.conf
@@ -132,7 +129,7 @@ Verify that the search path and name server are set up like the following
132129
(note that search path may vary for different cloud providers):
133130
-->
134131
验证 search 和 nameserver 的配置是否与下面的内容类似
135-
(注意 search 根据不同的云提供商可能会有所不同)
132+
(注意 search 根据不同的云提供商可能会有所不同
136133

137134
```
138135
search default.svc.cluster.local svc.cluster.local cluster.local google.internal c.gce_project_id.internal
@@ -159,6 +156,9 @@ Address 1: 10.0.0.10
159156
nslookup: can't resolve 'kubernetes.default'
160157
```
161158

159+
<!--
160+
or
161+
-->
162162
或者
163163

164164
```shell
@@ -197,10 +197,10 @@ coredns-7b96bf9f76-mvmmt 1/1 Running 0 1h
197197
...
198198
```
199199

200+
{{< note >}}
200201
<!--
201202
The value for label `k8s-app` is `kube-dns` for both CoreDNS and kube-dns deployments.
202203
-->
203-
{{< note >}}
204204
对于 CoreDNS 和 kube-dns 部署而言,标签 `k8s-app` 的值都应该是 `kube-dns`
205205
{{< /note >}}
206206

@@ -271,11 +271,10 @@ kube-dns ClusterIP 10.0.0.10 <none> 53/UDP,53/TCP 1h
271271
...
272272
```
273273

274+
{{< note >}}
274275
<!--
275276
The service name is `kube-dns` for both CoreDNS and kube-dns deployments.
276277
-->
277-
278-
{{< note >}}
279278
不管是 CoreDNS 还是 kube-dns,这个服务的名字都会是 `kube-dns`
280279
{{< /note >}}
281280

@@ -286,8 +285,7 @@ but it does not appear, see
286285
more information.
287286
-->
288287
如果你已经创建了 DNS 服务,或者该服务应该是默认自动创建的但是它并没有出现,
289-
请阅读[调试服务](/zh-cn/docs/tasks/debug/debug-application/debug-service/)
290-
来获取更多信息。
288+
请阅读[调试服务](/zh-cn/docs/tasks/debug/debug-application/debug-service/)来获取更多信息。
291289

292290
<!--
293291
### Are DNS endpoints exposed?
@@ -316,11 +314,11 @@ For additional Kubernetes DNS examples, see the
316314
[cluster-dns examples](https://github.com/kubernetes/examples/tree/master/staging/cluster-dns)
317315
in the Kubernetes GitHub repository.
318316
-->
319-
如果你没看到对应的端点,请阅读
320-
[调试服务](/zh-cn/docs/tasks/debug/debug-application/debug-service/)的端点部分。
317+
如果你没看到对应的端点,
318+
请阅读[调试服务](/zh-cn/docs/tasks/debug/debug-application/debug-service/)的端点部分。
321319

322320
若需要了解更多的 Kubernetes DNS 例子,请在 Kubernetes GitHub 仓库里查看
323-
[cluster-dns 示例](https://github.com/kubernetes/examples/tree/master/staging/cluster-dns)
321+
[cluster-dns 示例](https://github.com/kubernetes/examples/tree/master/staging/cluster-dns)
324322

325323
<!--
326324
### Are DNS queries being received/processed?
@@ -394,8 +392,8 @@ linux/amd64, go1.10.3, 2e322f6
394392
2018/09/07 15:29:04 [INFO] plugin/reload: Running configuration MD5 = 162475cdf272d8aa601e6fe67a6ad42f
395393
2018/09/07 15:29:04 [INFO] Reloading complete
396394
172.17.0.18:41675 - [07/Sep/2018:15:29:11 +0000] 59925 "A IN kubernetes.default.svc.cluster.local. udp 54 false 512" NOERROR qr,aa,rd,ra 106 0.000066649s
397-
398395
```
396+
399397
<!--
400398
### Does CoreDNS have sufficient permissions?
401399
@@ -454,6 +452,7 @@ kubectl edit clusterrole system:coredns -n kube-system
454452
Example insertion of EndpointSlices permissions:
455453
-->
456454
EndpointSlices 权限的插入示例:
455+
457456
```
458457
...
459458
- apiGroups:
@@ -528,7 +527,8 @@ Kubernetes installs do not configure the nodes' `resolv.conf` files to use the
528527
cluster DNS by default, because that process is inherently distribution-specific.
529528
This should probably be implemented eventually.
530529
-->
531-
Kubernetes 的安装并不会默认配置节点的 `resolv.conf` 文件来使用集群的 DNS 服务,因为这个配置对于不同的发行版本是不一样的。这个问题应该迟早会被解决的。
530+
Kubernetes 的安装并不会默认配置节点的 `resolv.conf` 文件来使用集群的 DNS 服务,
531+
因为这个配置对于不同的发行版本是不一样的。这个问题应该迟早会被解决的。
532532

533533
<!--
534534
Linux's libc (a.k.a. glibc) has a limit for the DNS `nameserver` records to 3 by

0 commit comments

Comments
 (0)