Skip to content

Commit 520404a

Browse files
authored
Merge pull request #21289 from bweston92/feat/nodelocaldns-image-jpg-to-svg
feat: turn nodelocaldns image to svg
2 parents e39b468 + 85c8fd8 commit 520404a

File tree

4 files changed

+24
-21
lines changed

4 files changed

+24
-21
lines changed

content/en/docs/tasks/administer-cluster/nodelocaldns.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ reviewers:
66
title: Using NodeLocal DNSCache in Kubernetes clusters
77
content_template: templates/task
88
---
9-
9+
1010
{{% capture overview %}}
1111
{{< feature-state for_k8s_version="v1.18" state="stable" >}}
1212
This page provides an overview of NodeLocal DNSCache feature in Kubernetes.
@@ -27,7 +27,7 @@ NodeLocal DNSCache improves Cluster DNS performance by running a dns caching age
2727

2828
## Motivation
2929

30-
* With the current DNS architecture, it is possible that Pods with the highest DNS QPS have to reach out to a different node, if there is no local kube-dns/CoreDNS instance.
30+
* With the current DNS architecture, it is possible that Pods with the highest DNS QPS have to reach out to a different node, if there is no local kube-dns/CoreDNS instance.
3131
Having a local cache will help improve the latency in such scenarios.
3232

3333
* Skipping iptables DNAT and connection tracking will help reduce [conntrack races](https://github.com/kubernetes/kubernetes/issues/56903) and avoid UDP DNS entries filling up conntrack table.
@@ -45,7 +45,7 @@ Having a local cache will help improve the latency in such scenarios.
4545
This is the path followed by DNS Queries after NodeLocal DNSCache is enabled:
4646

4747

48-
{{< figure src="/images/docs/nodelocaldns.jpg" alt="NodeLocal DNSCache flow" title="Nodelocal DNSCache flow" caption="This image shows how NodeLocal DNSCache handles DNS queries." >}}
48+
{{< figure src="/images/docs/nodelocaldns.svg" alt="NodeLocal DNSCache flow" title="Nodelocal DNSCache flow" caption="This image shows how NodeLocal DNSCache handles DNS queries." >}}
4949

5050
## Configuration
5151
{{< note >}} The local listen IP address for NodeLocal DNSCache can be any IP in the 169.254.20.0/16 space or any other IP address that can be guaranteed to not collide with any existing IP. This document uses 169.254.20.10 as an example.
@@ -54,33 +54,33 @@ This is the path followed by DNS Queries after NodeLocal DNSCache is enabled:
5454
This feature can be enabled using the following steps:
5555

5656
* Prepare a manifest similar to the sample [`nodelocaldns.yaml`](https://github.com/kubernetes/kubernetes/blob/master/cluster/addons/dns/nodelocaldns/nodelocaldns.yaml) and save it as `nodelocaldns.yaml.`
57-
* Substitute the variables in the manifest with the right values:
57+
* Substitute the variables in the manifest with the right values:
58+
59+
* kubedns=`kubectl get svc kube-dns -n kube-system -o jsonpath={.spec.clusterIP}`
60+
61+
* domain=`<cluster-domain>`
5862

59-
* kubedns=`kubectl get svc kube-dns -n kube-system -o jsonpath={.spec.clusterIP}`
60-
61-
* domain=`<cluster-domain>`
62-
6363
* localdns=`<node-local-address>`
64-
64+
6565
`<cluster-domain>` is "cluster.local" by default. `<node-local-address>` is the local listen IP address chosen for NodeLocal DNSCache.
6666

67-
* If kube-proxy is running in IPTABLES mode:
68-
67+
* If kube-proxy is running in IPTABLES mode:
68+
6969
``` bash
7070
sed -i "s/__PILLAR__LOCAL__DNS__/$localdns/g; s/__PILLAR__DNS__DOMAIN__/$domain/g; s/__PILLAR__DNS__SERVER__/$kubedns/g" nodelocaldns.yaml
7171
```
72-
73-
`__PILLAR__CLUSTER__DNS__` and `__PILLAR__UPSTREAM__SERVERS__` will be populated by the node-local-dns pods.
72+
73+
`__PILLAR__CLUSTER__DNS__` and `__PILLAR__UPSTREAM__SERVERS__` will be populated by the node-local-dns pods.
7474
In this mode, node-local-dns pods listen on both the kube-dns service IP as well as `<node-local-address>`, so pods can lookup DNS records using either IP address.
7575

76-
* If kube-proxy is running in IPVS mode:
77-
76+
* If kube-proxy is running in IPVS mode:
77+
7878
``` bash
7979
sed -i "s/__PILLAR__LOCAL__DNS__/$localdns/g; s/__PILLAR__DNS__DOMAIN__/$domain/g; s/__PILLAR__DNS__SERVER__//g; s/__PILLAR__CLUSTER__DNS__/$kubedns/g" nodelocaldns.yaml
8080
```
81-
In this mode, node-local-dns pods listen only on `<node-local-address>`. The node-local-dns interface cannot bind the kube-dns cluster IP since the interface used for IPVS loadbalancing already uses this address.
81+
In this mode, node-local-dns pods listen only on `<node-local-address>`. The node-local-dns interface cannot bind the kube-dns cluster IP since the interface used for IPVS loadbalancing already uses this address.
8282
`__PILLAR__UPSTREAM__SERVERS__` will be populated by the node-local-dns pods.
83-
83+
8484
* Run `kubectl create -f nodelocaldns.yaml`
8585
* If using kube-proxy in IPVS mode, `--cluster-dns` flag to kubelet needs to be modified to use `<node-local-address>` that NodeLocal DNSCache is listening on.
8686
Otherwise, there is no need to modify the value of the `--cluster-dns` flag, since NodeLocal DNSCache listens on both the kube-dns service IP as well as `<node-local-address>`.

content/zh/docs/tasks/administer-cluster/nodelocaldns.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ NodeLocal DNSCache improves Cluster DNS performance by running a dns caching age
4141
NodeLocal DNSCache 通过在集群节点上作为 DaemonSet 运行 dns 缓存代理来提高集群 DNS 性能。
4242
在当今的体系结构中,处于 ClusterFirst DNS 模式的 Pod 可以连接到 kube-dns serviceIP 进行 DNS 查询。
4343
通过 kube-proxy 添加的 iptables 规则将其转换为 kube-dns/CoreDNS 端点。
44-
借助这种新架构,Pods 将可以访问在同一节点上运行的 dns 缓存代理,从而避免了 iptables DNAT 规则和连接跟踪。
44+
借助这种新架构,Pods 将可以访问在同一节点上运行的 dns 缓存代理,从而避免了 iptables DNAT 规则和连接跟踪。
4545
本地缓存代理将查询 kube-dns 服务以获取集群主机名的缓存缺失(默认为 cluster.local 后缀)。
4646

4747
<!--
@@ -50,7 +50,7 @@ NodeLocal DNSCache 通过在集群节点上作为 DaemonSet 运行 dns 缓存代
5050
## 动机
5151

5252
<!--
53-
* With the current DNS architecture, it is possible that Pods with the highest DNS QPS have to reach out to a different node, if there is no local kube-dns/CoreDNS instance.
53+
* With the current DNS architecture, it is possible that Pods with the highest DNS QPS have to reach out to a different node, if there is no local kube-dns/CoreDNS instance.
5454
Having a local cache will help improve the latency in such scenarios.
5555
-->
5656
* 使用当前的 DNS 体系结构,如果没有本地 kube-dns/CoreDNS 实例,则具有最高 DNS QPS 的 Pod 可能必须延伸到另一个节点。
@@ -94,9 +94,9 @@ This is the path followed by DNS Queries after NodeLocal DNSCache is enabled:
9494

9595

9696
<!--
97-
{{< figure src="/images/docs/nodelocaldns.jpg" alt="NodeLocal DNSCache flow" title="Nodelocal DNSCache flow" caption="This image shows how NodeLocal DNSCache handles DNS queries." >}}
97+
{{< figure src="/images/docs/nodelocaldns.svg" alt="NodeLocal DNSCache flow" title="Nodelocal DNSCache flow" caption="This image shows how NodeLocal DNSCache handles DNS queries." >}}
9898
-->
99-
{{< figure src="/images/docs/nodelocaldns.jpg" alt="NodeLocal DNSCache 流" title="Nodelocal DNSCache 流" caption="此图显示了 NodeLocal DNSCache 如何处理 DNS 查询。" >}}
99+
{{< figure src="/images/docs/nodelocaldns.svg" alt="NodeLocal DNSCache 流" title="Nodelocal DNSCache 流" caption="此图显示了 NodeLocal DNSCache 如何处理 DNS 查询。" >}}
100100

101101
<!--
102102
## Configuration

static/images/docs/nodelocaldns.jpg

-36.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)