[zh-cn] Sync files with en
parent
4e6eceff71
commit
2019818b30
|
@ -67,7 +67,7 @@ REVISION CHANGE-CAUSE
|
|||
|
||||
<!--
|
||||
* Change cause is copied from DaemonSet annotation `kubernetes.io/change-cause`
|
||||
to its revisions upon creation. You may specify `-record=true` in `kubectl`
|
||||
to its revisions upon creation. You may specify `--record=true` in `kubectl`
|
||||
to record the command executed in the change cause annotation.
|
||||
|
||||
To see the details of a specific revision:
|
||||
|
@ -93,11 +93,11 @@ Pod Template:
|
|||
Labels: foo=bar
|
||||
Containers:
|
||||
app:
|
||||
Image: ...
|
||||
Port: ...
|
||||
Environment: ...
|
||||
Mounts: ...
|
||||
Volumes: ...
|
||||
Image: ...
|
||||
Port: ...
|
||||
Environment: ...
|
||||
Mounts: ...
|
||||
Volumes: ...
|
||||
```
|
||||
|
||||
<!--
|
||||
|
|
|
@ -108,7 +108,7 @@ configuration file.
|
|||
|
||||
* `kubectl delete -f <filename|url>`
|
||||
|
||||
<!-- note
|
||||
<!--
|
||||
If configuration file has specified the `generateName` field in the `metadata`
|
||||
section instead of the `name` field, you cannot delete the object using
|
||||
`kubectl delete -f <filename|url>`.
|
||||
|
@ -252,7 +252,9 @@ used only by the controller selector with no other semantic meaning.
|
|||
-->
|
||||
推荐的方法是定义单个不变的 PodTemplate 标签,该标签仅由控制器选择器使用,而没有其他语义。
|
||||
|
||||
<!-- Example label: -->
|
||||
<!--
|
||||
Example label:
|
||||
-->
|
||||
标签示例:
|
||||
|
||||
```yaml
|
||||
|
@ -270,7 +272,7 @@ template:
|
|||
<!--
|
||||
* [Managing Kubernetes Objects Using Imperative Commands](/docs/tasks/manage-kubernetes-objects/imperative-command/)
|
||||
* [Declarative Management of Kubernetes Objects Using Configuration Files](/docs/tasks/manage-kubernetes-objects/declarative-config/)
|
||||
* [Kubectl Command Reference](/docs/reference/generated/kubectl/kubectl/)
|
||||
* [Kubectl Command Reference](/docs/reference/generated/kubectl/kubectl-commands/)
|
||||
* [Kubernetes API Reference](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/)
|
||||
-->
|
||||
* [使用命令式命令管理 Kubernetes 对象](/zh-cn/docs/tasks/manage-kubernetes-objects/imperative-command/)
|
||||
|
|
|
@ -32,7 +32,7 @@ kubectl kustomize <kustomization_directory>
|
|||
```
|
||||
|
||||
<!--
|
||||
To apply those Resources, run `kubectl apply` with `- -kustomize` or `-k` flag:
|
||||
To apply those Resources, run `kubectl apply` with `--kustomize` or `-k` flag:
|
||||
-->
|
||||
要应用这些资源,使用 `--kustomize` 或 `-k` 参数来执行 `kubectl apply`:
|
||||
|
||||
|
@ -130,8 +130,7 @@ metadata:
|
|||
```
|
||||
|
||||
<!--
|
||||
To generate a ConfigMap from an env file, add an entry to the `envs` list in `configMapGenerator`.
|
||||
Here is an example of generating a ConfigMap with a data item from a `.env` file:
|
||||
To generate a ConfigMap from an env file, add an entry to the `envs` list in `configMapGenerator`. Here is an example of generating a ConfigMap with a data item from a `.env` file:
|
||||
-->
|
||||
要从 env 文件生成 ConfigMap,请在 `configMapGenerator` 中的 `envs` 列表中添加一个条目。
|
||||
下面是一个用来自 `.env` 文件的数据生成 ConfigMap 的例子:
|
||||
|
@ -1166,9 +1165,7 @@ Run the following command to apply the Deployment object `dev-my-nginx`:
|
|||
执行下面的命令来应用 Deployment 对象 `dev-my-nginx`:
|
||||
|
||||
```shell
|
||||
kubectl apply -k ./
|
||||
```
|
||||
```
|
||||
> kubectl apply -k ./
|
||||
deployment.apps/dev-my-nginx created
|
||||
```
|
||||
|
||||
|
@ -1200,9 +1197,7 @@ Run the following command to delete the Deployment object `dev-my-nginx`:
|
|||
执行下面的命令删除 Deployment 对象 `dev-my-nginx`:
|
||||
|
||||
```shell
|
||||
kubectl delete -k ./
|
||||
```
|
||||
```
|
||||
> kubectl delete -k ./
|
||||
deployment.apps "dev-my-nginx" deleted
|
||||
```
|
||||
|
||||
|
|
|
@ -18,9 +18,9 @@ min-kubernetes-server-version: 1.7
|
|||
<!-- overview -->
|
||||
|
||||
<!--
|
||||
Adding entries to a Pod's /etc/hosts file provides Pod-level override of hostname resolution when DNS and other options are not applicable. You can add these custom entries with the HostAliases field in PodSpec.
|
||||
Adding entries to a Pod's `/etc/hosts` file provides Pod-level override of hostname resolution when DNS and other options are not applicable. You can add these custom entries with the HostAliases field in PodSpec.
|
||||
|
||||
Modification not using HostAliases is not suggested because the file is managed by Kubelet and can be overwritten on during Pod creation/restart.
|
||||
Modification not using HostAliases is not suggested because the file is managed by the kubelet and can be overwritten on during Pod creation/restart.
|
||||
-->
|
||||
当 DNS 配置以及其它选项不合理的时候,通过向 Pod 的 `/etc/hosts` 文件中添加条目,
|
||||
可以在 Pod 级别覆盖对主机名的解析。你可以通过 PodSpec 的 HostAliases
|
||||
|
@ -32,7 +32,7 @@ Modification not using HostAliases is not suggested because the file is managed
|
|||
<!-- steps -->
|
||||
|
||||
<!--
|
||||
## Default Hosts File Content
|
||||
## Default hosts file content
|
||||
|
||||
Start an Nginx Pod which is assigned a Pod IP:
|
||||
-->
|
||||
|
@ -89,19 +89,19 @@ By default, the `hosts` file only includes IPv4 and IPv6 boilerplates like
|
|||
默认情况下,`hosts` 文件只包含 IPv4 和 IPv6 的样板内容,像 `localhost` 和主机名称。
|
||||
|
||||
<!--
|
||||
## Adding Additional Entries with HostAliases
|
||||
## Adding additional entries with hostAliases
|
||||
|
||||
In addition to the default boilerplate, we can add additional entries to the
|
||||
In addition to the default boilerplate, you can add additional entries to the
|
||||
`hosts` file.
|
||||
For example: to resolve `foo.local`, `bar.local` to `127.0.0.1` and `foo.remote`,
|
||||
`bar.remote` to `10.1.2.3`, we can configure HostAliases for a Pod under
|
||||
`bar.remote` to `10.1.2.3`, you can configure HostAliases for a Pod under
|
||||
`.spec.hostAliases`:
|
||||
-->
|
||||
## 通过 HostAliases 增加额外条目
|
||||
|
||||
除了默认的样板内容,我们可以向 `hosts` 文件添加额外的条目。
|
||||
除了默认的样板内容,你可以向 `hosts` 文件添加额外的条目。
|
||||
例如,要将 `foo.local`、`bar.local` 解析为 `127.0.0.1`,
|
||||
将 `foo.remote`、 `bar.remote` 解析为 `10.1.2.3`,我们可以在
|
||||
将 `foo.remote`、 `bar.remote` 解析为 `10.1.2.3`,你可以在
|
||||
`.spec.hostAliases` 下为 Pod 配置 HostAliases。
|
||||
|
||||
{{< codenew file="service/networking/hostaliases-pod.yaml" >}}
|
||||
|
@ -158,7 +158,7 @@ fe00::2 ip6-allrouters
|
|||
```
|
||||
|
||||
<!--
|
||||
With the additional entries specified at the bottom.
|
||||
with the additional entries specified at the bottom.
|
||||
-->
|
||||
在最下面额外添加了一些条目。
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ reviewers:
|
|||
title: Horizontal Pod Autoscaler Walkthrough
|
||||
content_type: task
|
||||
weight: 100
|
||||
min-kubernetes-server-version: 1.23
|
||||
-->
|
||||
|
||||
<!-- overview -->
|
||||
|
@ -61,8 +62,7 @@ HorizontalPodAutoscaler 会指示工作负载资源(Deployment、StatefulSet
|
|||
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
|
||||
<!--
|
||||
If you're running an older
|
||||
release of Kubernetes, refer to the version of the documentation for that release (see
|
||||
If you're running an older release of Kubernetes, refer to the version of the documentation for that release (see
|
||||
[available documentation versions](/docs/home/supported-doc-versions/)).
|
||||
-->
|
||||
如果你运行的是旧版本的 Kubernetes,请参阅该版本的文档版本
|
||||
|
@ -159,7 +159,9 @@ Deployment 然后更新 ReplicaSet —— 这是所有 Deployment 在 Kubernetes
|
|||
请参阅[算法详细信息](/zh-cn/docs/tasks/run-application/horizontal-pod-autoscale/#algorithm-details)。
|
||||
|
||||
|
||||
<!-- Create the HorizontalPodAutoscaler: -->
|
||||
<!--
|
||||
Create the HorizontalPodAutoscaler:
|
||||
-->
|
||||
创建 HorizontalPodAutoscaler:
|
||||
|
||||
```shell
|
||||
|
@ -181,7 +183,9 @@ You can check the current status of the newly-made HorizontalPodAutoscaler, by r
|
|||
kubectl get hpa
|
||||
```
|
||||
|
||||
<!-- The output is similar to: -->
|
||||
<!--
|
||||
The output is similar to:
|
||||
-->
|
||||
输出类似于:
|
||||
|
||||
```
|
||||
|
@ -258,7 +262,7 @@ php-apache Deployment/php-apache/scale 305% / 50% 1 10 7
|
|||
|
||||
<!--
|
||||
Here, CPU consumption has increased to 305% of the request.
|
||||
As a result, the deployment was resized to 7 replicas:
|
||||
As a result, the Deployment was resized to 7 replicas:
|
||||
-->
|
||||
这时,由于请求增多,CPU 利用率已经升至请求值的 305%。
|
||||
可以看到,Deployment 的副本数量已经增长到了 7:
|
||||
|
@ -319,7 +323,9 @@ NAME REFERENCE TARGET MINPODS MAXPODS REPL
|
|||
php-apache Deployment/php-apache/scale 0% / 50% 1 10 1 11m
|
||||
```
|
||||
|
||||
<!-- and the Deployment also shows that it has scaled down: -->
|
||||
<!--
|
||||
and the Deployment also shows that it has scaled down:
|
||||
-->
|
||||
Deployment 也显示它已经缩小了:
|
||||
|
||||
```shell
|
||||
|
|
Loading…
Reference in New Issue