@@ -384,13 +384,15 @@ following Pod-specific DNS policies. These policies are specified in the
384
384
See [related discussion](/docs/tasks/administer-cluster/dns-custom-nameservers)
385
385
for more details.
386
386
- " `ClusterFirst` " : Any DNS query that does not match the configured cluster
387
- domain suffix, such as "`www.kubernetes.io`", is forwarded to the upstream
388
- nameserver inherited from the node . Cluster administrators may have extra
387
+ domain suffix, such as "`www.kubernetes.io`", is forwarded to an upstream
388
+ nameserver by the DNS server . Cluster administrators may have extra
389
389
stub-domain and upstream DNS servers configured.
390
390
See [related discussion](/docs/tasks/administer-cluster/dns-custom-nameservers)
391
391
for details on how DNS queries are handled in those cases.
392
392
- " `ClusterFirstWithHostNet` " : For Pods running with hostNetwork, you should
393
- explicitly set its DNS policy "`ClusterFirstWithHostNet`".
393
+ explicitly set its DNS policy to "`ClusterFirstWithHostNet`". Otherwise, Pods
394
+ running with hostNetwork and `"ClusterFirst"` will fallback to the behavior
395
+ of the `"Default"` policy.
394
396
- Note : This is not supported on Windows. See [below](#dns-windows) for details
395
397
- " `None` " : It allows a Pod to ignore DNS settings from the Kubernetes
396
398
environment. All DNS settings are supposed to be provided using the
@@ -405,11 +407,12 @@ DNS 策略可以逐个 Pod 来设定。目前 Kubernetes 支持以下特定 Pod
405
407
- " `Default` " : Pod 从运行所在的节点继承名称解析配置。
406
408
参考[相关讨论](/zh-cn/docs/tasks/administer-cluster/dns-custom-nameservers)获取更多信息。
407
409
- " `ClusterFirst` " : 与配置的集群域后缀不匹配的任何 DNS 查询(例如 "www.kubernetes.io")
408
- 都将转发到从节点继承的上游名称服务器 。集群管理员可能配置了额外的存根域和上游 DNS 服务器。
410
+ 都会由 DNS 服务器转发到上游名称服务器 。集群管理员可能配置了额外的存根域和上游 DNS 服务器。
409
411
参阅[相关讨论](/zh-cn/docs/tasks/administer-cluster/dns-custom-nameservers)
410
412
了解在这些场景中如何处理 DNS 查询的信息。
411
- - " `ClusterFirstWithHostNet`" :对于以 hostNetwork 方式运行的 Pod,应显式设置其 DNS 策略
412
- " `ClusterFirstWithHostNet`" 。
413
+ - " `ClusterFirstWithHostNet` " : 对于以 hostNetwork 方式运行的 Pod,应将其 DNS 策略显式设置为
414
+ " `ClusterFirstWithHostNet`" 。否则,以 hostNetwork 方式和 `"ClusterFirst"` 策略运行的
415
+ Pod 将会做出回退至 `"Default"` 策略的行为。
413
416
- 注意:这在 Windows 上不支持。 有关详细信息,请参见[下文](#dns-windows)。
414
417
- " `None` " : 此设置允许 Pod 忽略 Kubernetes 环境中的 DNS 设置。Pod 会使用其 `dnsConfig`
415
418
字段所提供的 DNS 设置。
0 commit comments