Skip to content

Commit f79ea78

Browse files
authored
Merge pull request #45953 from my-git9/patch-14810
[zh-cn] sync manage-resources-containers secret pod-security-admission web-ui-dashboard
2 parents e6599b2 + 9b03a07 commit f79ea78

File tree

4 files changed

+48
-56
lines changed

4 files changed

+48
-56
lines changed

content/zh-cn/docs/concepts/configuration/manage-resources-containers.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,11 +1094,11 @@ available amount is simultaneously allocated to Pods.
10941094
<!--
10951095
The API server restricts quantities of extended resources to whole numbers.
10961096
Examples of _valid_ quantities are `3`, `3000m` and `3Ki`. Examples of
1097-
_invalid_ quantities are `0.5` and `1500m`.
1097+
_invalid_ quantities are `0.5` and `1500m` (because `1500m` would result in `1.5`).
10981098
-->
10991099
API 服务器将扩展资源的数量限制为整数。
11001100
**有效** 数量的示例是 `3`、`3000m` 和 `3Ki`。
1101-
**无效** 数量的示例是 `0.5` 和 `1500m`。
1101+
**无效** 数量的示例是 `0.5` 和 `1500m`(因为 `1500m` 结果等同于 `1.5`)
11021102

11031103
{{< note >}}
11041104
<!--
@@ -1224,12 +1224,12 @@ You can check node capacities and amounts allocated with the
12241224
12251225
- 向集群添加更多节点。
12261226
- 终止不需要的 Pod,为悬决的 Pod 腾出空间。
1227-
- 检查 Pod 所需的资源是否超出所有节点的资源容量。例如,如果所有节点的容量都是`cpu:1`,
1227+
- 检查 Pod 所需的资源是否超出所有节点的资源容量。例如,如果所有节点的容量都是 `cpu:1`,
12281228
那么一个请求为 `cpu: 1.1` 的 Pod 永远不会被调度。
12291229
- 检查节点上的污点设置。如果集群中节点上存在污点,而新的 Pod 不能容忍污点,
12301230
调度器只会考虑将 Pod 调度到不带有该污点的节点上。
12311231
1232-
你可以使用 `kubectl describe nodes` 命令检查节点容量和已分配的资源数量。 例如:
1232+
你可以使用 `kubectl describe nodes` 命令检查节点容量和已分配的资源数量。例如:
12331233
12341234
```shell
12351235
kubectl describe nodes e2e-test-node-pool-4lw4
@@ -1313,7 +1313,7 @@ resource, including a configured ResourceQuota.
13131313
设置资源配额有助于防止一个团队占用太多资源,以至于这种占用会影响其他团队。
13141314

13151315
你还需要考虑为这些名字空间设置授权访问:
1316-
为名字空间提供 **全部** 的写权限时,具有合适权限的人可能删除所有资源,
1316+
为名字空间提供**全部**的写权限时,具有合适权限的人可能删除所有资源,
13171317
包括所配置的 ResourceQuota。
13181318

13191319
<!--

content/zh-cn/docs/concepts/configuration/secret.md

Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,38 +1076,13 @@ For instructions, refer to
10761076
可以参阅[使用 Secret 数据定义容器变量](/zh-cn/docs/tasks/inject-data-application/distribute-credentials-secure/#define-container-environment-variables-using-secret-data)
10771077

10781078
<!--
1079-
#### Invalid environment variables {#restriction-env-from-invalid}
1080-
1081-
If your environment variable definitions in your Pod specification are
1082-
considered to be invalid environment variable names, those keys aren't made
1083-
available to your container. The Pod is allowed to start.
1084-
-->
1085-
#### 非法环境变量 {#restriction-env-from-invalid}
1086-
1087-
如果 Pod 规约中环境变量定义会被视为非法的环境变量名,这些主键将在你的容器中不可用。
1088-
Pod 仍然可以启动。
1089-
1090-
<!--
1091-
Kubernetes adds an Event with the reason set to `InvalidVariableNames` and a
1092-
message that lists the skipped invalid keys. The following example shows a Pod that refers to a Secret named `mysecret`, where `mysecret` contains 2 invalid keys: `1badkey` and `2alsobad`.
1093-
-->
1094-
Kubernetes 添加一个 Event,其 reason 设置为 `InvalidVariableNames`,其消息将列举被略过的非法主键。
1095-
下面的例子中展示了一个 Pod,引用的是名为 `mysecret` 的 Secret,
1096-
其中包含两个非法的主键:`1badkey``2alsobad`
1097-
1098-
```shell
1099-
kubectl get events
1100-
```
1101-
1102-
<!--
1103-
The output is similar to:
1079+
It's important to note that the range of characters allowed for environment variable
1080+
names in pods is [restricted](/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config).
1081+
If any keys do not meet the rules, those keys are not made available to your container, though
1082+
the Pod is allowed to start.
11041083
-->
1105-
输出类似于:
1106-
1107-
```
1108-
LASTSEEN FIRSTSEEN COUNT NAME KIND SUBOBJECT TYPE REASON
1109-
0s 0s 1 dapi-test-pod Pod Warning InvalidEnvironmentVariableNames kubelet, 127.0.0.1 Keys [1badkey, 2alsobad] from the EnvFrom secret default/mysecret were skipped since they are considered invalid environment variable names.
1110-
```
1084+
需要注意的是,Pod 中环境变量名称允许的字符范围是[有限的](/zh-cn/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config)
1085+
如果某些变量名称不满足这些规则,则即使 Pod 是可以启动的,你的容器也无法访问这些变量。
11111086

11121087
<!--
11131088
### Container image pull Secrets {#using-imagepullsecrets}
@@ -1120,7 +1095,7 @@ level.
11201095
### 容器镜像拉取 Secret {#using-imagepullsecrets}
11211096

11221097
如果你尝试从私有仓库拉取容器镜像,你需要一种方式让每个节点上的 kubelet
1123-
能够完成与镜像库的身份认证。你可以配置 **镜像拉取 Secret** 来实现这点。
1098+
能够完成与镜像库的身份认证。你可以配置**镜像拉取 Secret** 来实现这点。
11241099
Secret 是在 Pod 层面来配置的。
11251100

11261101
<!--
@@ -1528,7 +1503,7 @@ Existing Pods maintain a mount point to the deleted Secret - it is recommended t
15281503
these pods.
15291504
-->
15301505
一旦一个 Secret 或 ConfigMap 被标记为不可更改,撤销此操作或者更改 `data`
1531-
字段的内容都是 **不** 可能的。
1506+
字段的内容都是**不**可能的。
15321507
只能删除并重新创建这个 Secret。现有的 Pod 将维持对已删除 Secret 的挂载点 --
15331508
建议重新创建这些 Pod。
15341509
{{< /note >}}

content/zh-cn/docs/concepts/security/pod-security-admission.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,14 +235,14 @@ current policy level:
235235
- Any metadata updates **except** changes to the seccomp or AppArmor annotations:
236236
- `seccomp.security.alpha.kubernetes.io/pod` (deprecated)
237237
- `container.seccomp.security.alpha.kubernetes.io/*` (deprecated)
238-
- `container.apparmor.security.beta.kubernetes.io/*`
238+
- `container.apparmor.security.beta.kubernetes.io/*` (deprecated)
239239
- Valid updates to `.spec.activeDeadlineSeconds`
240240
- Valid updates to `.spec.tolerations`
241241
-->
242242
- 除了对 seccomp 或 AppArmor 注解之外的所有元数据(Metadata)更新操作:
243243
- `seccomp.security.alpha.kubernetes.io/pod` (已弃用)
244244
- `container.seccomp.security.alpha.kubernetes.io/*` (已弃用)
245-
- `container.apparmor.security.beta.kubernetes.io/*`
245+
- `container.apparmor.security.beta.kubernetes.io/*`(已弃用)
246246
- 对 `.spec.activeDeadlineSeconds` 的合法更新
247247
- 对 `.spec.tolerations` 的合法更新
248248

content/zh-cn/docs/tasks/access-application-cluster/web-ui-dashboard.md

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Dashboard also provides information on the state of Kubernetes resources in your
4242
Dashboard 是基于网页的 Kubernetes 用户界面。
4343
你可以使用 Dashboard 将容器应用部署到 Kubernetes 集群中,也可以对容器应用排错,还能管理集群资源。
4444
你可以使用 Dashboard 获取运行在集群中的应用的概览信息,也可以创建或者修改 Kubernetes 资源
45-
(如 DeploymentJobDaemonSet 等等)。
45+
(如 DeploymentJobDaemonSet 等等)。
4646
例如,你可以对 Deployment 实现弹性伸缩、发起滚动升级、重启 Pod 或者使用向导创建新的应用。
4747

4848
Dashboard 同时展示了 Kubernetes 集群中的资源状态信息和所有报错信息。
@@ -53,14 +53,32 @@ Dashboard 同时展示了 Kubernetes 集群中的资源状态信息和所有报
5353

5454
<!--
5555
## Deploying the Dashboard UI
56+
-->
57+
## 部署 Dashboard UI {#deploying-the-dashboard-ui}
5658

59+
{{< note >}}
60+
<!--
61+
Kubernetes Dashboard supports only Helm-based installation currently as it is faster
62+
and gives us better control over all dependencies required by Dashboard to run.
63+
-->
64+
Kubernetes Dashboard 目前仅支持基于 Helm 的安装,因为它速度更快,
65+
并且可以让我们更好地控制 Dashboard 运行所需的所有依赖项。
66+
{{< /note >}}
67+
68+
<!--
5769
The Dashboard UI is not deployed by default. To deploy it, run the following command:
5870
-->
59-
## 部署 Dashboard UI {#deploying-the-dashboard-ui}
60-
默认情况下不会部署 Dashboard。可以通过以下命令部署:
71+
默认情况下不会部署 Dashboard,可以通过以下命令部署:
6172

73+
<!--
74+
# Add kubernetes-dashboard repository
75+
# Deploy a Helm Release named "kubernetes-dashboard" using the kubernetes-dashboard chart
76+
-->
6277
```
63-
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml
78+
# 添加 kubernetes-dashboard 仓库
79+
helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
80+
# 使用 kubernetes-dashboard Chart 部署名为 `kubernetes-dashboard` 的 Helm Release
81+
helm upgrade --install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard --create-namespace --namespace kubernetes-dashboard
6482
```
6583

6684
<!--
@@ -108,7 +126,7 @@ kubectl 会使得 Dashboard 可以通过 [http://localhost:8001/api/v1/namespace
108126
<!--
109127
The UI can _only_ be accessed from the machine where the command is executed. See `kubectl proxy --help` for more options.
110128
-->
111-
UI _只能_ 通过执行这条命令的机器进行访问。更多选项参见 `kubectl proxy --help`
129+
UI **只能**通过执行这条命令的机器进行访问。更多选项参见 `kubectl proxy --help`
112130

113131
{{< note >}}
114132
<!--
@@ -149,7 +167,7 @@ You can either manually specify application details, or upload a YAML or JSON _m
149167

150168
通过一个简单的部署向导,你可以使用 Dashboard 将容器化应用作为一个 Deployment 和可选的
151169
Service 进行创建和部署。你可以手工指定应用的详细配置,或者上传一个包含应用配置的 YAML
152-
或 JSON _清单_文件
170+
或 JSON **清单**文件
153171

154172
<!--
155173
Click the **CREATE** button in the upper right corner of any page to begin.
@@ -261,7 +279,7 @@ If needed, you can expand the **Advanced options** section where you can specify
261279
such as release, environment, tier, partition, and release track.
262280
-->
263281
- **标签**:应用默认使用的
264-
[标签](/zh-cn/docs/concepts/overview/working-with-objects/labels/) 是应用名称和版本。
282+
[标签](/zh-cn/docs/concepts/overview/working-with-objects/labels/)是应用名称和版本。
265283
你可以为 Deployment、Service(如果有)定义额外的标签,比如 release(版本)、
266284
environment(环境)、tier(层级)、partition(分区) 和 release track(版本跟踪)。
267285

@@ -281,8 +299,7 @@ If needed, you can expand the **Advanced options** section where you can specify
281299
They let you partition resources into logically named groups.
282300
-->
283301
- **名字空间**:Kubernetes 支持多个虚拟集群依附于同一个物理集群。
284-
这些虚拟集群被称为
285-
[名字空间](/zh-cn/docs/tasks/administer-cluster/namespaces/)
302+
这些虚拟集群被称为[名字空间](/zh-cn/docs/tasks/administer-cluster/namespaces/)
286303
可以让你将资源划分为逻辑命名的组。
287304

288305
<!--
@@ -346,8 +363,8 @@ If needed, you can expand the **Advanced options** section where you can specify
346363
[entrypoint command](/docs/tasks/inject-data-application/define-command-argument-container/).
347364
You can use the command options and arguments to override the default.
348365
-->
349-
- **运行命令****运行命令参数**:默认情况下,你的容器会运行 Docker 镜像的默认
350-
[入口命令](/zh-cn/docs/tasks/inject-data-application/define-command-argument-container/)
366+
- **运行命令****运行命令参数**:默认情况下,你的容器会运行 Docker
367+
镜像的默认[入口命令](/zh-cn/docs/tasks/inject-data-application/define-command-argument-container/)
351368
你可以使用 command 选项覆盖默认值。
352369

353370
<!--
@@ -371,7 +388,7 @@ If needed, you can expand the **Advanced options** section where you can specify
371388
- **环境变量**:Kubernetes 通过
372389
[环境变量](/zh-cn/docs/tasks/inject-data-application/environment-variable-expose-pod-information/)
373390
暴露 Service。你可以构建环境变量,或者将环境变量的值作为参数传递给你的命令。
374-
它们可以被应用用于查找 Service。值可以通过 `$(VAR_NAME)` 语法关联其他变量。
391+
它们可以被应用用于查找 Service。值可以通过 `$(VAR_NAME)` 语法关联其他变量。
375392

376393
<!--
377394
### Uploading a YAML or JSON file
@@ -383,8 +400,8 @@ The manifests use Kubernetes [API](/docs/concepts/overview/kubernetes-api/) reso
383400
### 上传 YAML 或者 JSON 文件 {#uploading-a-yaml-or-json-file}
384401

385402
Kubernetes 支持声明式配置。所有的配置都存储在清单文件
386-
(YAML 或者 JSON 配置文件)中。这些
387-
清单使用 Kubernetes [API](/zh-cn/docs/concepts/overview/kubernetes-api/) 定义的资源模式。
403+
(YAML 或者 JSON 配置文件)中。
404+
这些清单使用 Kubernetes [API](/zh-cn/docs/concepts/overview/kubernetes-api/) 定义的资源模式。
388405

389406
<!--
390407
As an alternative to specifying application details in the deploy wizard,
@@ -412,7 +429,7 @@ this can be changed using the namespace selector located in the navigation menu.
412429
### 导航 {#navigation}
413430

414431
当在集群中定义 Kubernetes 对象时,Dashboard 会在初始视图中显示它们。
415-
默认情况下只会显示 _默认_ 名字空间中的对象,可以通过更改导航栏菜单中的名字空间筛选器进行改变。
432+
默认情况下只会显示**默认**名字空间中的对象,可以通过更改导航栏菜单中的名字空间筛选器进行改变。
416433

417434
<!--
418435
Dashboard shows most Kubernetes object kinds and groups them in a few menu categories.
@@ -512,4 +529,4 @@ Pod 列表和详细信息页面可以链接到 Dashboard 内置的日志查看
512529
For more information, see the
513530
[Kubernetes Dashboard project page](https://github.com/kubernetes/dashboard).
514531
-->
515-
更多信息,参见 [Kubernetes Dashboard 项目页面](https://github.com/kubernetes/dashboard).
532+
更多信息,参见 [Kubernetes Dashboard 项目页面](https://github.com/kubernetes/dashboard)

0 commit comments

Comments
 (0)