Skip to content

Commit 9e1a873

Browse files
authored
Merge pull request #34242 from howieyuen/zh-34221-reference-2
[zh]Resync content/zh-cn/docs/reference/command-line-tools-reference/kube-proxy.md(reference-2)
2 parents 9a7029a + b3ac2c1 commit 9e1a873

File tree

1 file changed

+132
-74
lines changed
  • content/zh-cn/docs/reference/command-line-tools-reference

1 file changed

+132
-74
lines changed

content/zh-cn/docs/reference/command-line-tools-reference/kube-proxy.md

Lines changed: 132 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -54,92 +54,76 @@ kube-proxy [flags]
5454
<tbody>
5555

5656
<tr>
57-
<td colspan="2">--azure-container-registry-config string</td>
57+
<td colspan="2">--add_dir_header</td>
5858
</tr>
5959
<tr>
6060
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
6161
<!--
62-
Path to the file containing Azure container registry configuration information.
62+
If true, adds the file directory to the header of the log messages
6363
-->
64-
包含 Azure 容器仓库配置信息的文件的路径。
64+
如果为 true,将文件目录添加到日志消息的头部
6565
</p>
6666
</td>
6767
</tr>
6868

6969
<tr>
70-
<td colspan="2">--bind-address 0.0.0.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:0.0.0.0</td>
70+
<td colspan="2">--alsologtostderr</td>
7171
</tr>
7272
<tr>
7373
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
7474
<!--
75-
The IP address for the proxy server to serve on (set to '0.0.0.0' for all IPv4 interfaces and '::' for all IPv6 interfaces). This parameter is ignored if a config file is specified by --config.
75+
log to standard error as well as files
7676
-->
77-
代理服务器要使用的 IP 地址(设置为 '0.0.0.0' 表示要使用所有 IPv4 接口;
78-
设置为 '::' 表示使用所有 IPv6 接口)。
79-
如果配置文件由 --config 指定,则忽略此参数。
77+
设置为 true 表示将日志输出到文件的同时输出到 stderr
8078
</p>
8179
</td>
8280
</tr>
8381

8482
<tr>
85-
<td colspan="2">--bind-address-hard-fail</td>
83+
<td colspan="2">--bind-address string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:0.0.0.0</td>
8684
</tr>
8785
<tr>
8886
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
8987
<!--
90-
If true kube-proxy will treat failure to bind to a port as fatal and exit
88+
The IP address for the proxy server to serve on (set to '0.0.0.0' for all IPv4 interfaces and '::' for all IPv6 interfaces). This parameter is ignored if a config file is specified by --config.
9189
-->
92-
若此标志为 true,kube-proxy 会将无法绑定端口的失败操作视为致命错误并退出。
90+
代理服务器的 IP 地址(所有 IPv4 接口设置为 “0.0.0.0”,所有 IPv6 接口设置为 “::”)。
91+
如果配置文件由 <code>--config</code> 指定,则忽略此参数。
9392
</p></td>
9493
</tr>
9594

9695
<tr>
97-
<td colspan="2">--boot-id-file string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:"/proc/sys/kernel/random/boot_id"</td>
96+
<td colspan="2">--bind-address-hard-fail</td>
9897
</tr>
9998
<tr>
10099
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
101100
<!--
102-
Comma-separated list of files to check for boot-id. Use the first one that exists.
101+
If true kube-proxy will treat failure to bind to a port as fatal and exit
103102
-->
104-
用来检查 Boot-ID 的文件名,用逗号隔开。
105-
第一个存在的文件会被使用。
103+
如果为 true,kube-proxy 会将无法绑定端口的失败操作视为致命错误并退出。
106104
</p></td>
107105
</tr>
108106

109107
<tr>
110-
<td colspan="2">--cleanup</td>
108+
<td colspan="2">--boot_id_file string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:"/proc/sys/kernel/random/boot_id"</td>
111109
</tr>
112110
<tr>
113111
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
114-
<!--
115-
If true cleanup iptables and ipvs rules and exit.
116-
-->
117-
如果为 true,清理 iptables 和 ipvs 规则并退出。
118-
</p>
119-
</td>
120-
</tr>
121-
122-
<tr>
123-
<td colspan="2">--cloud-provider-gce-l7lb-src-cidrs cidrs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:130.211.0.0/22,35.191.0.0/16</td>
124-
</tr>
125-
<tr>
126-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
127-
<!--
128-
CIDRs opened in GCE firewall for L7 LB traffic proxy &amp; health checks
129-
-->
130-
此值表示,在 GCE 防火墙中打开 <code>CIDRs</code> 用于 L7 LB 流量代理 &amp; 健康检查。
131-
</td>
112+
<!-- Comma-separated list of files to check for boot-id. Use the first one that exists. -->
113+
逗号分隔的文件列表,用于检查 boot-id。使用第一个存在的文件。
114+
</p></td>
132115
</tr>
133116

134117
<tr>
135-
<td colspan="2">--cloud-provider-gce-lb-src-cidrs cidrs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16</td>
118+
<td colspan="2">--cleanup</td>
136119
</tr>
137120
<tr>
138-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
121+
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
139122
<!--
140-
CIDRs opened in GCE firewall for L4 LB traffic proxy &amp; health checks
123+
If true cleanup iptables and ipvs rules and exit.
141124
-->
142-
此值表示,在 GCE 防火墙中打开 <code>CIDRs</code> 用于 L4 LB 流量代理 &amp; 健康检查。
125+
如果为 true,清理 iptables 和 ipvs 规则并退出。
126+
</p>
143127
</td>
144128
</tr>
145129

@@ -242,32 +226,6 @@ Idle timeout for established TCP connections (0 to leave as-is)
242226
</td>
243227
</tr>
244228

245-
<tr>
246-
<td colspan="2">--default-not-ready-toleration-seconds int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:300</td>
247-
</tr>
248-
<tr>
249-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
250-
<!--
251-
Indicates the tolerationSeconds of the toleration for notReady:NoExecute that is added by default to every pod that does not already have such a toleration.
252-
-->
253-
对污点 NotReady:NoExecute 的容忍时长(以秒计)。
254-
默认情况下这一容忍度会被添加到尚未具有此容忍度的每个 pod 中。
255-
</td>
256-
</tr>
257-
258-
<tr>
259-
<td colspan="2">--default-unreachable-toleration-seconds int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:300</td>
260-
</tr>
261-
<tr>
262-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
263-
<!--
264-
Indicates the tolerationSeconds of the toleration for unreachable:NoExecute that is added by default to every pod that does not already have such a toleration.
265-
-->
266-
对污点 Unreachable:NoExecute 的容忍时长(以秒计)
267-
默认情况下这一容忍度会被添加到尚未具有此容忍度的每个 pod 中。
268-
</td>
269-
</tr>
270-
271229
<tr>
272230
<td colspan="2">--detect-local-mode LocalMode</td>
273231
</tr>
@@ -283,13 +241,13 @@ Mode to use to detect local traffic. This parameter is ignored if a config file
283241
</tr>
284242

285243
<tr>
286-
<td colspan="2">--feature-gates &lt;<!--comma-separated 'key=True|False' pairs-->逗号分隔的 'key=True|False' 对&gt;</td>
244+
<td colspan="2">--feature-gates &lt;<!--comma-separated 'key=True|False' pairs-->逗号分隔的 'key=True|False' 对&gt;</td>
287245
</tr>
288246
<tr>
289247
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
290248
<!--
291-
A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:
292-
<br/>
249+
A set of key=value pairs that describe feature gates for alpha/experimental features. Options are
250+
:<br/>
293251
APIListChunking=true|false (BETA - default=true)<br/>
294252
APIPriorityAndFairness=true|false (BETA - default=true)<br/>
295253
APIResponseCompression=true|false (BETA - default=true)<br/>
@@ -312,7 +270,6 @@ CSIMigrationPortworx=true|false (ALPHA - default=false)<br/>
312270
CSIMigrationRBD=true|false (ALPHA - default=false)<br/>
313271
CSIMigrationvSphere=true|false (BETA - default=false)<br/>
314272
CSIVolumeHealth=true|false (ALPHA - default=false)<br/>
315-
ContextualLogging=true|false (ALPHA - default=false)<br/>
316273
CronJobTimeZone=true|false (ALPHA - default=false)<br/>
317274
CustomCPUCFSQuotaPeriod=true|false (ALPHA - default=false)<br/>
318275
CustomResourceValidationExpressions=true|false (ALPHA - default=false)<br/>
@@ -392,7 +349,7 @@ WinOverlay=true|false (BETA - default=true)<br/>
392349
WindowsHostProcessContainers=true|false (BETA - default=true)
393350
This parameter is ignored if a config file is specified by --config.
394351
-->
395-
一组键=值(key=value)对,描述了 alpha/experimental 的特征。可选项有:
352+
一组键=值(key=value)对,描述了 alpha/experimental 的特征。可选项有:<br/>
396353
APIListChunking=true|false (BETA - 默认值=true)<br/>
397354
APIPriorityAndFairness=true|false (BETA - 默认值=true)<br/>
398355
APIResponseCompression=true|false (BETA - 默认值=true)<br/>
@@ -415,7 +372,6 @@ CSIMigrationPortworx=true|false (ALPHA - 默认值=false)<br/>
415372
CSIMigrationRBD=true|false (ALPHA - 默认值=false)<br/>
416373
CSIMigrationvSphere=true|false (BETA - 默认值=false)<br/>
417374
CSIVolumeHealth=true|false (ALPHA - 默认值=false)<br/>
418-
ContextualLogging=true|false (ALPHA - 默认值=false)<br/>
419375
CronJobTimeZone=true|false (ALPHA - 默认值=false)<br/>
420376
CustomCPUCFSQuotaPeriod=true|false (ALPHA - 默认值=false)<br/>
421377
CustomResourceValidationExpressions=true|false (ALPHA - 默认值=false)<br/>
@@ -739,18 +695,60 @@ Path to kubeconfig file with authorization information (the master location is s
739695
</tr>
740696

741697
<tr>
742-
<td colspan="2">--machine-id-file string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:"/etc/machine-id,/var/lib/dbus/machine-id"</td>
698+
<td colspan="2">--log_backtrace_at &lt;<!--a string in the form 'file:N'-->“file:N” 格式的字符串&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:0</td>
743699
</tr>
744700
<tr>
745701
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
746702
<!--
747-
Comma-separated list of files to check for machine-id. Use the first one that exists.
703+
when logging hits line file:N, emit a stack trace
748704
-->
749-
用来检查 Machine-ID 的文件列表,用逗号分隔。
750-
使用找到的第一个文件。
705+
当日志命中 file:N,触发一次堆栈追踪
706+
</p></td>
707+
</tr>
708+
709+
<tr>
710+
<td colspan="2">--log_dir string</td>
711+
</tr>
712+
<tr>
713+
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
714+
<!-- If non-empty, write log files in this directory -->
715+
如果非空,则在此目录中写入日志文件
716+
</p></td>
717+
</tr>
718+
719+
<tr>
720+
<td colspan="2">--log_file string</td>
721+
</tr>
722+
<tr>
723+
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
724+
<!-- If non-empty, use this log file -->
725+
如果非空,使用此日志文件
726+
</p></td>
727+
</tr>
728+
729+
<tr>
730+
<td colspan="2">--log_file_max_size uint&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:1800</td>
731+
</tr>
732+
<tr>
733+
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
734+
<!-- Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum ile size is unlimited. -->
735+
定义日志文件可以增长到的最大大小。单位是兆字节。
736+
如果值为 0,则最大文件大小不受限制。
751737
</p></td>
752738
</tr>
753739

740+
<tr>
741+
<td colspan="2">--logtostderr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:true</td>
742+
</tr>
743+
<tr>
744+
<td></td><td style="line-height: 130%; word-wrap: break-word;">
745+
<p>
746+
<!-- log to standard error instead of files -->
747+
日志输出到 stderr 而不是文件。
748+
</p>
749+
</td>
750+
</tr>
751+
754752
<tr>
755753
<td colspan="2">--machine_id_file string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:"/etc/machine-id,/var/lib/dbus/machine-id"</td>
756754
</tr>
@@ -823,6 +821,16 @@ A string slice of values which specify the addresses to use for NodePorts. Value
823821
</td>
824822
</tr>
825823

824+
<tr>
825+
<td colspan="2">--one_output</td>
826+
</tr>
827+
<tr>
828+
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
829+
<!-- If true, only write logs to their native severity level (vs also writing to each lower severity level) -->
830+
如果为 true,则仅将日志写入本地的严重性级别(而不是写入每个较低的严重性级别)
831+
</p></td>
832+
</tr>
833+
826834
<tr>
827835
<td colspan="2">--oom-score-adj int32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:-999</td>
828836
</tr>
@@ -928,6 +936,36 @@ The previous version for which you want to show hidden metrics. Only the previou
928936
</td>
929937
</tr>
930938

939+
<tr>
940+
<td colspan="2">--skip_headers</td>
941+
</tr>
942+
<tr>
943+
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
944+
<!-- If true, avoid header prefixes in the log messages -->
945+
如果为 true,则避免在日志消息中使用头部前缀
946+
</p></td>
947+
</tr>
948+
949+
<tr>
950+
<td colspan="2">--skip_log_headers</td>
951+
</tr>
952+
<tr>
953+
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
954+
<!-- If true, avoid headers when opening log files -->
955+
如果为 true,则在打开日志文件时避免使用头部
956+
</p></td>
957+
</tr>
958+
959+
<tr>
960+
<td colspan="2">--stderrthreshold int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:2</td>
961+
</tr>
962+
<tr>
963+
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
964+
<!-- logs at or above this threshold go to stderr -->
965+
设置严重程度达到或超过此阈值的日志输出到标准错误输出。
966+
</p></td>
967+
</tr>
968+
931969
<tr>
932970
<td colspan="2">--udp-timeout duration&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:250ms</td>
933971
</tr>
@@ -942,6 +980,16 @@ How long an idle UDP connection will be kept open (e.g. '250ms', '2s'). Must be
942980
</td>
943981
</tr>
944982

983+
<tr>
984+
<td colspan="2">-v, --v int</td>
985+
</tr>
986+
<tr>
987+
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
988+
<!-- number for the log level verbosity -->
989+
设置日志级别详细程度的数值。
990+
</p></td>
991+
</tr>
992+
945993
<tr>
946994
<td colspan="2">--version version[=true]</td>
947995
</tr>
@@ -955,6 +1003,16 @@ Print version information and quit
9551003
</td>
9561004
</tr>
9571005

1006+
<tr>
1007+
<td colspan="2">--vmodule &lt;<!--comma-separated 'pattern=N' settings-->逗号分割的 “pattern=N” 设置&gt;</td>
1008+
</tr>
1009+
<tr>
1010+
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
1011+
<!-- comma-separated list of pattern=N settings for file-filtered logging -->
1012+
以逗号分割的 pattern=N 设置的列表,用于文件过滤日志
1013+
</p></td>
1014+
</tr>
1015+
9581016
<tr>
9591017
<td colspan="2">--write-config-to string</td>
9601018
</tr>

0 commit comments

Comments
 (0)