Skip to content

Commit 6b8198b

Browse files
committed
[zh-cn] sync task files of task-7
Signed-off-by: Guangwen Feng <[email protected]>
1 parent e9bfdf6 commit 6b8198b

File tree

5 files changed

+40
-24
lines changed

5 files changed

+40
-24
lines changed

content/zh-cn/docs/tasks/configure-pod-container/enforce-standards-admission-controller.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
---
22
title: 通过配置内置准入控制器实施 Pod 安全标准
33
content_type: task
4+
weight: 240
45
---
56
<!--
67
title: Enforce Pod Security Standards by Configuring the Built-in Admission Controller
78
reviewers:
89
- tallclair
910
- liggitt
1011
content_type: task
12+
weight: 240
1113
-->
1214

1315
<!--

content/zh-cn/docs/tasks/configure-pod-container/enforce-standards-namespace-labels.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
---
22
title: 使用名字空间标签来实施 Pod 安全性标准
33
content_type: task
4+
weight: 250
45
---
56
<!--
67
title: Enforce Pod Security Standards with Namespace Labels
78
reviewers:
89
- tallclair
910
- liggitt
1011
content_type: task
12+
weight: 250
1113
-->
1214

1315
<!--

content/zh-cn/docs/tasks/configure-pod-container/extended-resource.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
title: 为容器分派扩展资源
33
content_type: task
4-
weight: 40
4+
weight: 70
55
---
66

77
<!--
88
title: Assign Extended Resources to a Container
99
content_type: task
10-
weight: 40
10+
weight: 70
1111
-->
1212

1313
<!-- overview -->
@@ -166,7 +166,7 @@ It has a status of Pending:
166166
-->
167167
输出结果表明 Pod 虽然被创建了,但没有被调度到节点上正常运行。Pod 的状态为 Pending:
168168

169-
```
169+
```yaml
170170
NAME READY STATUS RESTARTS AGE
171171
extended-resource-demo-2 0/1 Pending 0 6m
172172
```

content/zh-cn/docs/tasks/configure-pod-container/security-context.md

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: 为 Pod 或容器配置安全上下文
33
content_type: task
4-
weight: 80
4+
weight: 110
55
---
66
<!--
77
reviewers:
@@ -10,7 +10,7 @@ reviewers:
1010
- thockin
1111
title: Configure a Security Context for a Pod or Container
1212
content_type: task
13-
weight: 80
13+
weight: 110
1414
-->
1515

1616
<!-- overview -->
@@ -21,41 +21,52 @@ a Pod or Container. Security context settings include, but are not limited to:
2121
2222
* Discretionary Access Control: Permission to access an object, like a file, is based on
2323
[user ID (UID) and group ID (GID)](https://wiki.archlinux.org/index.php/users_and_groups).
24+
2425
* [Security Enhanced Linux (SELinux)](https://en.wikipedia.org/wiki/Security-Enhanced_Linux):
2526
Objects are assigned security labels.
27+
2628
* Running as privileged or unprivileged.
27-
* [Linux Capabilities](https://linux-audit.com/linux-capabilities-hardening-linux-binaries-by-removing-setuid/):
29+
30+
* [Linux Capabilities](https://linux-audit.com/linux-capabilities-hardening-linux-binaries-by-removing-setuid/):
2831
Give a process some privileges, but not all the privileges of the root user.
32+
2933
-->
3034
安全上下文(Security Context)定义 Pod 或 Container 的特权与访问控制设置。
3135
安全上下文包括但不限于:
3236

3337
* 自主访问控制(Discretionary Access Control):
3438
基于[用户 ID(UID)和组 ID(GID)](https://wiki.archlinux.org/index.php/users_and_groups)
3539
来判定对对象(例如文件)的访问权限。
40+
3641
* [安全性增强的 Linux(SELinux)](https://zh.wikipedia.org/wiki/%E5%AE%89%E5%85%A8%E5%A2%9E%E5%BC%BA%E5%BC%8FLinux)
3742
为对象赋予安全性标签。
43+
3844
* 以特权模式或者非特权模式运行。
45+
3946
* [Linux 权能](https://linux-audit.com/linux-capabilities-hardening-linux-binaries-by-removing-setuid/):
4047
为进程赋予 root 用户的部分特权而非全部特权。
48+
4149
<!--
4250
* [AppArmor](/docs/tutorials/security/apparmor/):
4351
Use program profiles to restrict the capabilities of individual programs.
52+
4453
* [Seccomp](/docs/tutorials/security/seccomp/): Filter a process's system calls.
54+
4555
* `allowPrivilegeEscalation`: Controls whether a process can gain more privileges than
4656
its parent process. This bool directly controls whether the
4757
[`no_new_privs`](https://www.kernel.org/doc/Documentation/prctl/no_new_privs.txt)
4858
flag gets set on the container process.
49-
`allowPrivilegeEscalation` is always true
50-
when the container:
59+
`allowPrivilegeEscalation` is always true when the container:
5160
5261
- is run as privileged, or
5362
- has `CAP_SYS_ADMIN`
5463
55-
* readOnlyRootFilesystem: Mounts the container's root filesystem as read-only.
64+
* `readOnlyRootFilesystem`: Mounts the container's root filesystem as read-only.
5665
-->
5766
* [AppArmor](/zh-cn/docs/tutorials/security/apparmor/):使用程序配置来限制个别程序的权能。
67+
5868
* [Seccomp](/zh-cn/docs/tutorials/security/seccomp/):过滤进程的系统调用。
69+
5970
* `allowPrivilegeEscalation`:控制进程是否可以获得超出其父进程的特权。
6071
此布尔值直接控制是否为容器进程设置
6172
[`no_new_privs`](https://www.kernel.org/doc/Documentation/prctl/no_new_privs.txt)标志。
@@ -64,10 +75,10 @@ a Pod or Container. Security context settings include, but are not limited to:
6475
- 以特权模式运行,或者
6576
- 具有 `CAP_SYS_ADMIN` 权能
6677

67-
* readOnlyRootFilesystem:以只读方式加载容器的根文件系统。
78+
* `readOnlyRootFilesystem`:以只读方式加载容器的根文件系统。
6879

6980
<!--
70-
The above bullets are not a complete set of security context settings - please see
81+
The above bullets are not a complete set of security context settings -- please see
7182
[SecurityContext](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#securitycontext-v1-core)
7283
for a comprehensive list.
7384
-->
@@ -702,7 +713,7 @@ To assign SELinux labels, the SELinux security module must be loaded on the host
702713
{{< feature-state for_k8s_version="v1.25" state="alpha" >}}
703714

704715
<!--
705-
By default, the contrainer runtime recursively assigns SELinux label to all
716+
By default, the container runtime recursively assigns SELinux label to all
706717
files on all Pod volumes. To speed up this process, Kubernetes can change the
707718
SELinux label of a volume instantly by using a mount option
708719
`-o context=<label>`.
@@ -804,15 +815,15 @@ Pod 的安全上下文适用于 Pod 中的容器,也适用于 Pod 所挂载的
804815
该部分设置的是赋予 Pod 中所有容器及卷的
805816
[多类别安全性(Multi-Category Security,MCS)](https://selinuxproject.org/page/NB_MLS)标签。
806817

807-
<!--
808-
After you specify an MCS label for a Pod, all Pods with the same label can
809-
access the Volume. If you need inter-Pod protection, you must assign a unique
810-
MCS label to each Pod.
811-
-->
812-
{{< warning >}}
813-
在为 Pod 设置 MCS 标签之后,所有带有相同标签的 Pod 可以访问该卷。
814-
如果你需要跨 Pod 的保护,你必须为每个 Pod 赋予独特的 MCS 标签。
815-
{{< /warning >}}
818+
<!--
819+
After you specify an MCS label for a Pod, all Pods with the same label can
820+
access the Volume. If you need inter-Pod protection, you must assign a unique
821+
MCS label to each Pod.
822+
-->
823+
{{< warning >}}
824+
在为 Pod 设置 MCS 标签之后,所有带有相同标签的 Pod 可以访问该卷。
825+
如果你需要跨 Pod 的保护,你必须为每个 Pod 赋予独特的 MCS 标签。
826+
{{< /warning >}}
816827

817828
<!--
818829
## Clean up
@@ -842,7 +853,8 @@ kubectl delete pod security-context-demo-4
842853
* [AllowPrivilegeEscalation design
843854
document](https://git.k8s.io/design-proposals-archive/auth/no-new-privs.md)
844855
* For more information about security mechanisms in Linux, see
845-
[Overview of Linux Kernel Security Features](https://www.linux.com/learn/overview-linux-kernel-security-features) (Note: Some information is out of date)
856+
[Overview of Linux Kernel Security Features](https://www.linux.com/learn/overview-linux-kernel-security-features)
857+
(Note: Some information is out of date)
846858
-->
847859
* [PodSecurityContext](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podsecuritycontext-v1-core) API 定义
848860
* [SecurityContext](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#securitycontext-v1-core) API 定义

content/zh-cn/docs/tasks/configure-pod-container/static-pod.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
title: 创建静态 Pod
3-
weight: 170
3+
weight: 220
44
content_type: task
55
---
66
<!--
77
reviewers:
88
- jsafrane
99
title: Create static Pods
10-
weight: 170
10+
weight: 220
1111
content_type: task
1212
-->
1313

0 commit comments

Comments
 (0)