Skip to content

Commit 0720b1d

Browse files
committed
[zh] Translate task enable-disable-api
make change according to tengqm's comment
1 parent b3ab071 commit 0720b1d

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
title: 启用/禁用 Kubernetes API
3+
content_type: task
4+
---
5+
<!--
6+
---
7+
title: Enable Or Disable A Kubernetes API
8+
content_type: task
9+
---
10+
-->
11+
12+
<!-- overview -->
13+
<!--
14+
This page shows how to enable or disable an API version from your cluster's
15+
{{< glossary_tooltip text="control plane" term_id="control-plane" >}}.
16+
-->
17+
本页展示怎么用集群的
18+
{{< glossary_tooltip text="控制平面" term_id="control-plane" >}}.
19+
启用/禁用 API 版本。
20+
21+
<!-- steps -->
22+
23+
24+
<!--
25+
Specific API versions can be turned on or off by passing `--runtime-config=api/<version>` as a
26+
command line argument to the API server. The values for this argument are a comma-separated
27+
list of API versions. Later values override earlier values.
28+
29+
The `runtime-config` command line argument also supports 2 special keys:
30+
-->
31+
通过 API 服务器的命令行参数 `--runtime-config=api/<version>`
32+
可以开启/关闭某个指定的 API 版本。
33+
此参数的值是一个逗号分隔的 API 版本列表。
34+
此列表中,后面的值可以覆盖前面的值。
35+
36+
命令行参数 `runtime-config` 支持两个特殊的值(keys):
37+
38+
<!--
39+
- `api/all`, representing all known APIs
40+
- `api/legacy`, representing only legacy APIs. Legacy APIs are any APIs that have been
41+
explicitly [deprecated](/zh/docs/reference/using-api/deprecation-policy/).
42+
43+
For example, to turning off all API versions except v1, pass `--runtime-config=api/all=false,api/v1=true`
44+
to the `kube-apiserver`.
45+
-->
46+
- `api/all`:指所有已知的 API
47+
- `api/legacy`:指过时的 API。过时的 API 就是明确地
48+
[弃用](/zh/docs/reference/using-api/deprecation-policy/)
49+
的 API。
50+
51+
例如:为了停用除去 v1 版本之外的全部其他 API 版本,
52+
就用参数 `--runtime-config=api/all=false,api/v1=true` 启动 `kube-apiserver`
53+
54+
## {{% heading "whatsnext" %}}
55+
56+
<!--
57+
Read the [full documentation](/docs/reference/command-line-tools-reference/kube-apiserver/)
58+
for the `kube-apiserver` component.
59+
-->
60+
阅读[完整的文档](/zh/docs/reference/command-line-tools-reference/kube-apiserver/),
61+
以了解 `kube-apiserver` 组件。

0 commit comments

Comments
 (0)