@@ -262,11 +262,11 @@ The service name is `kube-dns` for both CoreDNS and kube-dns deployments.
262
262
<!--
263
263
If you have created the Service or in the case it should be created by default
264
264
but it does not appear, see
265
- [debugging Services](/docs/tasks/debug-application-cluster /debug-service/) for
265
+ [debugging Services](/docs/tasks/debug/debug -application/debug-service/) for
266
266
more information.
267
267
-->
268
268
如果你已经创建了 DNS 服务,或者该服务应该是默认自动创建的但是它并没有出现,
269
- 请阅读[ 调试服务] ( /zh/docs/tasks/debug-application-cluster /debug-service/ )
269
+ 请阅读[ 调试服务] ( /zh/docs/tasks/debug/debug -application/debug-service/ )
270
270
来获取更多信息。
271
271
272
272
<!--
@@ -290,14 +290,14 @@ kube-dns 10.180.3.17:53,10.180.3.17:53 1h
290
290
291
291
<!--
292
292
If you do not see the endpoints, see endpoints section in the
293
- [debugging services](/docs/tasks/debug-application-cluster /debug-service/) documentation.
293
+ [debugging services](/docs/tasks/debug/debug -application/debug-service/) documentation.
294
294
295
295
For additional Kubernetes DNS examples, see the
296
296
[cluster-dns examples](https://github.com/kubernetes/examples/tree/master/staging/cluster-dns)
297
297
in the Kubernetes GitHub repository.
298
298
-->
299
299
如果你没看到对应的端点,请阅读
300
- [ 调试服务] ( /zh/docs/tasks/debug-application-cluster /debug-service/ ) 的端点部分。
300
+ [ 调试服务] ( /zh/docs/tasks/debug/debug -application/debug-service/ ) 的端点部分。
301
301
302
302
若需要了解更多的 Kubernetes DNS 例子,请在 Kubernetes GitHub 仓库里查看
303
303
[ cluster-dns 示例] ( https://github.com/kubernetes/examples/tree/master/staging/cluster-dns ) 。
@@ -374,6 +374,74 @@ linux/amd64, go1.10.3, 2e322f6
374
374
2018/09/07 15:29:04 [INFO] Reloading complete
375
375
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
376
376
377
+ ```
378
+ <!--
379
+ ### Does CoreDNS have sufficient permissions?
380
+
381
+ CoreDNS must be able to list {{< glossary_tooltip text="service"
382
+ term_id="service" >}} and {{< glossary_tooltip text="endpoint"
383
+ term_id="endpoint" >}} related resources to properly resolve service names.
384
+
385
+ Sample error message:
386
+ -->
387
+ ### CoreDNS 是否有足够的权限?
388
+
389
+ CoreDNS 必须能够列出 {{< glossary_tooltip text="service" term_id="service" >}} 和
390
+ {{< glossary_tooltip text="endpoint" term_id="endpoint" >}} 相关的资源来正确解析服务名称。
391
+
392
+ 示例错误消息:
393
+ ```
394
+ 2022-03-18T07:12:15.699431183Z [INFO] 10.96.144.227:52299 - 3686 "A IN serverproxy.contoso.net.cluster.local. udp 52 false 512" SERVFAIL qr,aa,rd 145 0.000091221s
395
+ ```
396
+
397
+ <!--
398
+ First, get the current ClusterRole of `system:coredns`:
399
+ -->
400
+ 首先,获取当前的 ClusterRole ` system:coredns ` :
401
+
402
+ ``` shell
403
+ kubectl describe clusterrole system:coredns -n kube-system
404
+ ```
405
+
406
+ <!--
407
+ Expected output:
408
+ -->
409
+ 预期输出:
410
+ ```
411
+ PolicyRule:
412
+ Resources Non-Resource URLs Resource Names Verbs
413
+ --------- ----------------- -------------- -----
414
+ nodes [] [] [get]
415
+ endpoints [] [] [list watch]
416
+ namespaces [] [] [list watch]
417
+ pods [] [] [list watch]
418
+ services [] [] [list watch]
419
+ endpointslices.discovery.k8s.io [] [] [list watch]
420
+ ```
421
+
422
+ <!--
423
+ If any permissions are missing, edit the ClusterRole to add them:
424
+ -->
425
+ 如果缺少任何权限,请编辑 ClusterRole 来添加它们:
426
+
427
+ ``` shell
428
+ kubectl edit clusterrole system:coredns -n kube-system
429
+ ```
430
+
431
+ <!--
432
+ Example insertion of EndpointSlices permissions:
433
+ -->
434
+ EndpointSlices 权限的插入示例:
435
+ ```
436
+ ...
437
+ - apiGroups:
438
+ - discovery.k8s.io
439
+ resources:
440
+ - endpointslices
441
+ verbs:
442
+ - list
443
+ - watch
444
+ ...
377
445
```
378
446
379
447
<!--
@@ -386,9 +454,6 @@ If the namespace of the pod and service differ, the DNS query must include
386
454
the namespace of the service.
387
455
388
456
This query is limited to the pod's namespace:
389
- ```shell
390
- kubectl exec -i -t dnsutils -- nslookup <service-name>
391
- ```
392
457
-->
393
458
### 你的服务在正确的命名空间中吗?
394
459
@@ -403,9 +468,6 @@ kubectl exec -i -t dnsutils -- nslookup <service-name>
403
468
404
469
<!--
405
470
This query specifies the namespace:
406
- ```shell
407
- kubectl exec -i -t dnsutils -- nslookup <service-name>.<namespace>
408
- ```
409
471
-->
410
472
指定命名空间的查询:
411
473
``` shell
0 commit comments