Skip to content

Commit 9604f69

Browse files
authored
Merge pull request #38894 from windsonsea/appary
[zh] sync apparmor.md cluster-level-pss.md
2 parents ac63c4c + 978b45b commit 9604f69

File tree

2 files changed

+24
-22
lines changed

2 files changed

+24
-22
lines changed

content/zh-cn/docs/tutorials/security/apparmor.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
title: 使用 AppArmor 限制容器对资源的访问
33
content_type: tutorial
4-
weight: 10
4+
weight: 30
55
---
66
<!--
77
reviewers:
88
- stclair
99
title: Restrict a Container's Access to Resources with AppArmor
1010
content_type: tutorial
11-
weight: 10
11+
weight: 30
1212
-->
1313

1414
<!-- overview -->
@@ -481,7 +481,7 @@ Note the pod status is Pending, with a helpful error message: `Pod Cannot enforc
481481

482482
<!--
483483
Kubernetes does not currently provide any native mechanisms for loading AppArmor profiles onto
484-
nodes. There are lots of ways to setup the profiles though, such as:
484+
nodes. There are lots of ways to set up the profiles though, such as:
485485
-->
486486
Kubernetes 目前不提供任何本地机制来将 AppArmor 配置文件加载到节点上。
487487
有很多方法可以设置配置文件,例如:

content/zh-cn/docs/tutorials/security/cluster-level-pss.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ weight: 10
1010
-->
1111

1212
{{% alert title="Note" %}}
13-
<!-- This tutorial applies only for new clusters. -->
13+
<!--
14+
This tutorial applies only for new clusters.
15+
-->
1416
本教程仅适用于新集群。
1517
{{% /alert %}}
1618

@@ -48,7 +50,7 @@ Pod 安全准入是在创建 Pod 时应用
4850
Install the following on your workstation:
4951
5052
- [KinD](https://kind.sigs.k8s.io/docs/user/quick-start/#installation)
51-
- [kubectl](https://kubernetes.io/docs/tasks/tools/)
53+
- [kubectl](/docs/tasks/tools/)
5254
-->
5355
在你的工作站中安装以下内容:
5456

@@ -76,7 +78,7 @@ that are most appropriate for your configuration, do the following:
7678

7779
<!--
7880
1. Create a cluster with no Pod Security Standards applied:
79-
-->
81+
-->
8082
1. 创建一个没有应用 Pod 安全标准的集群:
8183

8284
```shell
@@ -98,7 +100,6 @@ that are most appropriate for your configuration, do the following:
98100
kubectl cluster-info --context kind-psa-wo-cluster-pss
99101
100102
Thanks for using kind! 😊
101-
102103
```
103104

104105
<!--
@@ -111,11 +112,11 @@ that are most appropriate for your configuration, do the following:
111112
```
112113
<!-- The output is similar to this: -->
113114
输出类似于:
114-
115115
```
116-
Kubernetes control plane is running at https://127.0.0.1:61350
116+
Kubernetes control plane is running at https://127.0.0.1:61350
117+
117118
CoreDNS is running at https://127.0.0.1:61350/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
118-
119+
119120
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
120121
```
121122

@@ -141,7 +142,7 @@ that are most appropriate for your configuration, do the following:
141142
<!--
142143
1. Use `--dry-run=server` to understand what happens when different Pod Security Standards
143144
are applied:
144-
-->
145+
-->
145146
4. 使用 `--dry-run=server` 来了解应用不同的 Pod 安全标准时会发生什么:
146147

147148
1. Privileged
@@ -159,7 +160,7 @@ that are most appropriate for your configuration, do the following:
159160
namespace/local-path-storage labeled
160161
```
161162
2. Baseline
162-
```shell
163+
```shell
163164
kubectl label --dry-run=server --overwrite ns --all \
164165
pod-security.kubernetes.io/enforce=baseline
165166
```
@@ -280,16 +281,17 @@ following:
280281
namespaces: [kube-system]
281282
EOF
282283
```
283-
{{< note >}}
284-
<!--
285-
`pod-security.admission.config.k8s.io/v1` configuration requires v1.25+.
286-
For v1.23 and v1.24, use [v1beta1](https://v1-24.docs.kubernetes.io/docs/tasks/configure-pod-container/enforce-standards-admission-controller/).
287-
For v1.22, use [v1alpha1](https://v1-22.docs.kubernetes.io/docs/tasks/configure-pod-container/enforce-standards-admission-controller/).
288-
-->
284+
285+
{{< note >}}
286+
<!--
287+
`pod-security.admission.config.k8s.io/v1` configuration requires v1.25+.
288+
For v1.23 and v1.24, use [v1beta1](https://v1-24.docs.kubernetes.io/docs/tasks/configure-pod-container/enforce-standards-admission-controller/).
289+
For v1.22, use [v1alpha1](https://v1-22.docs.kubernetes.io/docs/tasks/configure-pod-container/enforce-standards-admission-controller/).
290+
-->
289291
`pod-security.admission.config.k8s.io/v1` 配置需要 v1.25+。
290-
对于 v1.23 和 v1.24,使用 [v1beta1](https://v1-24.docs.kubernetes.io/zh-cn/docs/tasks/configure-pod-container/enforce-standards-admission-controller/)。
291-
对于 v1.22,使用 [v1alpha1](https://v1-22.docs.kubernetes.io/docs/tasks/configure-pod-container/enforce-standards-admission-controller/)。
292-
{{< /note >}}
292+
对于 v1.23 和 v1.24,使用 [v1beta1](https://v1-24.docs.kubernetes.io/zh-cn/docs/tasks/configure-pod-container/enforce-standards-admission-controller/)。
293+
对于 v1.22,使用 [v1alpha1](https://v1-22.docs.kubernetes.io/docs/tasks/configure-pod-container/enforce-standards-admission-controller/)。
294+
{{< /note >}}
293295
294296
<!--
295297
1. Configure the API server to consume this file during cluster creation:
@@ -439,7 +441,7 @@ created.
439441
[shell script](/examples/security/kind-with-cluster-level-baseline-pod-security.sh)
440442
to perform all the preceding steps at once:
441443
1. Create a Pod Security Standards based cluster level Configuration
442-
2. Create a file to let API server consumes this configuration
444+
2. Create a file to let API server consume this configuration
443445
3. Create a cluster that creates an API server with this configuration
444446
4. Set kubectl context to this new cluster
445447
5. Create a minimal pod yaml file

0 commit comments

Comments
 (0)