Update kubernetes-api.md

This commit is contained in:
huccshen
2020-04-30 11:17:03 +08:00
committed by GitHub
parent bc3861ac11
commit 06d28b6466
@@ -226,15 +226,12 @@ There are two supported paths to extending the API with [custom resources](/docs
为客户提供无缝的服务。
<!--
## Enabling API groups
## Enabling or disabling API groups
Certain resources and API groups are enabled by default. They can be enabled or disabled by setting `--runtime-config`
on apiserver. `--runtime-config` accepts comma separated values. For ex: to disable batch/v1, set
on apiserver. `--runtime-config` accepts comma separated values. For example: to disable batch/v1, set
`--runtime-config=batch/v1=false`, to enable batch/v2alpha1, set `--runtime-config=batch/v2alpha1`.
The flag accepts comma separated set of key=value pairs describing runtime configuration of the apiserver.
IMPORTANT: Enabling or disabling groups or resources requires restarting apiserver and controller-manager
to pick up the `--runtime-config` changes.
-->
## 启用 API 组
@@ -244,22 +241,35 @@ to pick up the `--runtime-config` changes.
例如:要禁用batch/v1,请设置 `--runtime-config=batch/v1=false`,以启用batch/v2alpha1,请设置`--runtime-config=batch/v2alpha1`
该标志接受描述apiserver的运行时配置的逗号分隔的一组键值对。
重要:启用或禁用组或资源需要重新启动apiserver和控制器管理器来使得 `--runtime-config` 更改生效。
{{< note >}}
<!--
## Enabling resources in the groups
Enabling or disabling groups or resources requires restarting apiserver and controller-manager
to pick up the `--runtime-config` changes.
-->
启用或禁用组或资源需要重新启动apiserver和控制器管理器来使得 `--runtime-config` 更改生效。
DaemonSets, Deployments, HorizontalPodAutoscalers, Ingresses, Jobs and ReplicaSets are enabled by default.
Other extensions resources can be enabled by setting `--runtime-config` on
apiserver. `--runtime-config` accepts comma separated values. For example: to disable deployments and ingress, set
`--runtime-config=extensions/v1beta1/deployments=false,extensions/v1beta1/ingresses=false`
{{< /note >}}
## Enabling specific resources in the extensions/v1beta1 group
DaemonSets, Deployments, StatefulSet, NetworkPolicies, PodSecurityPolicies and ReplicaSets in the `extensions/v1beta1` API group are disabled by default.
For example: to enable deployments and daemonsets, set
`--runtime-config=extensions/v1beta1/deployments=true,extensions/v1beta1/daemonsets=true`.
-->
## 启用组中资源
## 启用 extensions/v1beta1 组中资源
DaemonSetsDeploymentsHorizontalPodAutoscalersIngressJobs 和 ReplicaSets是默认用的。
其他扩展资源可以通过在apiserver上设置 `--runtime-config` 来启用
`--runtime-config` 接受逗号分隔的值。 例如:要禁用 Deployment 和 Ingress
请设置 `--runtime-config=extensions/v1beta1/deployments=false,extensions/v1beta1/ingress=false`
`extensions/v1beta1` API 组中,DaemonSetsDeploymentsStatefulSet, NetworkPolicies, PodSecurityPolicies 和 ReplicaSets 是默认用的。
例如:要启用 deployments 和 daemonsets,请设置 `--runtime-config=extensions/v1beta1/deployments=true,extensions/v1beta1/daemonsets=true`
{{< note >}}
<!--
Individual resource enablement/disablement is only supported in the `extensions/v1beta1` API group for legacy reasons.
-->
出于遗留原因,仅在 `extensions / v1beta1` API 组中支持各个资源的启用/禁用。
{{< /note >}}
{{% /capture %}}