You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/zh/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins.md
+12-8Lines changed: 12 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,9 @@ weight: 10
14
14
15
15
{{< feature-state state="alpha" >}}
16
16
<!--
17
-
{{< warning >}}Alpha features change rapidly. {{< /warning >}}
17
+
{{< caution >}}Alpha features can change rapidly. {{< /caution >}}
18
18
-->
19
-
{{< warning >}}Alpha 特性迅速变化。{{< /warning >}}
19
+
{{< caution >}}Alpha 特性可能很快会变化。{{< /caution >}}
20
20
21
21
<!--
22
22
Network plugins in Kubernetes come in a few flavors:
@@ -36,7 +36,7 @@ Kubernetes中的网络插件有几种类型:
36
36
<!--
37
37
## Installation
38
38
39
-
The kubelet has a single default network plugin, and a default network common to the entire cluster. It probes for plugins when it starts up, remembers what it found, and executes the selected plugin at appropriate times in the pod lifecycle (this is only true for Docker, as rkt manages its own CNI plugins). There are two Kubelet command line parameters to keep in mind when using plugins:
39
+
The kubelet has a single default network plugin, and a default network common to the entire cluster. It probes for plugins when it starts up, remembers what it finds, and executes the selected plugin at appropriate times in the pod lifecycle (this is only true for Docker, as rkt manages its own CNI plugins). There are two Kubelet command line parameters to keep in mind when using plugins:
40
40
41
41
* `cni-bin-dir`: Kubelet probes this directory for plugins on startup
42
42
* `network-plugin`: The network plugin to use from `cni-bin-dir`. It must match the name reported by a plugin probed from the plugin directory. For CNI plugins, this is simply "cni".
The CNI plugin is selected by passing Kubelet the `--network-plugin=cni` command-line option. Kubelet reads a file from `--cni-conf-dir` (default `/etc/cni/net.d`) and uses the CNI configuration from that file to set up each pod's network. The CNI configuration file must match the [CNI specification](https://github.com/containernetworking/cni/blob/master/SPEC.md#network-configuration), and any required CNI plugins referenced by the configuration must be present in `--cni-bin-dir` (default `/opt/cni/bin`).
73
73
74
-
If there are multiple CNI configuration files in the directory, the first one in lexicographic order of file name is used.
74
+
If there are multiple CNI configuration files in the directory, the kubelet uses the configuration file that comes first by name in lexicographic order.
75
75
76
76
In addition to the CNI plugin specified by the configuration file, Kubernetes requires the standard CNI [`lo`](https://github.com/containernetworking/plugins/blob/master/plugins/main/loopback/loopback.go) plugin, at minimum version 0.2.0
77
77
-->
@@ -81,7 +81,7 @@ In addition to the CNI plugin specified by the configuration file, Kubernetes re
81
81
Kubelet 从 `--cni-conf-dir` (默认是 `/etc/cni/net.d`) 读取文件并使用该文件中的 CNI 配置来设置每个 pod 的网络。
The CNI networking plugin also supports pod ingress and egress traffic shaping. You can use the official [bandwidth](https://github.com/containernetworking/plugins/tree/master/plugins/meta/bandwidth)
138
140
plugin offered by the CNI plugin team or use your own plugin with bandwidth control functionality.
139
141
140
-
If you want to enable traffic shaping support, you must add a `bandwidth` plugin to your CNI configuration file
141
-
(default `/etc/cni/net.d`).
142
+
If you want to enable traffic shaping support, you must add the `bandwidth` plugin to your CNI configuration file
143
+
(default `/etc/cni/net.d`) and ensure that the binary is included in your CNI bin dir (default `/opt/cni/bin`).
0 commit comments