Skip to content

Commit 2f6f8f1

Browse files
authored
Merge pull request #51612 from my-git9/npa-28879
[zh-cn]sync linux-security secrets-good-practices labels-annotations-taints
2 parents a854aff + 60feda2 commit 2f6f8f1

File tree

3 files changed

+92
-14
lines changed

3 files changed

+92
-14
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: Linux 节点的安全性
3+
content_type: concept
4+
weight: 40
5+
---
6+
<!--
7+
reviewers:
8+
- lmktfy
9+
title: Security For Linux Nodes
10+
content_type: concept
11+
weight: 40
12+
-->
13+
14+
<!-- overview -->
15+
16+
<!--
17+
This page describes security considerations and best practices specific to the Linux operating system.
18+
-->
19+
本篇介绍特定于 Linux 操作系统的安全注意事项和最佳实践。
20+
21+
<!-- body -->
22+
23+
<!--
24+
## Protection for Secret data on nodes
25+
-->
26+
## 保护节点上的 Secret 数据 {#protection-for-secret-data-on-nodes}
27+
28+
<!--
29+
On Linux nodes, memory-backed volumes (such as [`secret`](/docs/concepts/configuration/secret/)
30+
volume mounts, or [`emptyDir`](/docs/concepts/storage/volumes/#emptydir) with `medium: Memory`)
31+
are implemented with a `tmpfs` filesystem.
32+
-->
33+
在 Linux 节点上,由内存支持的卷(例如 [`secret`](/zh-cn/docs/concepts/configuration/secret/)
34+
卷挂载,或带有 `medium: Memory`[`emptyDir`](/zh-cn/docs/concepts/storage/volumes/#emptydir)
35+
使用 `tmpfs` 文件系统实现。
36+
37+
<!--
38+
If you have swap configured and use an older Linux kernel (or a current kernel and an unsupported configuration of Kubernetes),
39+
**memory** backed volumes can have data written to persistent storage.
40+
-->
41+
如果你配置了交换分区并且使用较旧的 Linux 内核(或者内核是最新的,但其中某项配置是 Kubernetes 所不支持的),
42+
**内存**支持的卷可能会将数据写入持久存储。
43+
44+
<!--
45+
The Linux kernel officially supports the `noswap` option from version 6.3,
46+
therefore it is recommended the used kernel version is 6.3 or later,
47+
or supports the `noswap` option via a backport, if swap is enabled on the node.
48+
-->
49+
Linux 内核从 6.3 版本开始正式支持 `noswap` 选项,
50+
因此建议使用 6.3 或更新版本的内核,
51+
或者如果节点上启用了交换分区,确保内核通过补丁向下移植支持 `noswap` 选项。
52+
53+
<!--
54+
Read [swap memory management](/docs/concepts/cluster-administration/swap-memory-management/#memory-backed-volumes)
55+
for more info.
56+
-->
57+
更多信息参阅[交换内存管理](/zh-cn/docs/concepts/cluster-administration/swap-memory-management/#memory-backed-volumes)

content/zh-cn/docs/concepts/security/secrets-good-practices.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,17 @@ For a list of supported providers, refer to
161161
有关支持的提供商列表,请参阅
162162
[Secret 存储 CSI 驱动的提供商](https://secrets-store-csi-driver.sigs.k8s.io/concepts.html#provider-for-the-secrets-store-csi-driver)
163163

164+
<!--
165+
## Good practices for using swap memory
166+
167+
For best practices for setting swap memory for Linux nodes, please refer to
168+
[swap memory management](/docs/concepts/cluster-administration/swap-memory-management/#good-practice-for-using-swap-in-a-kubernetes-cluster).
169+
-->
170+
## 使用交换内存的良好实践 {#good-practices-for-using-swap-memory}
171+
172+
对于为 Linux 节点设置交换内存的最佳实践,
173+
请参阅[交换内存管理](/zh-cn/docs/concepts/cluster-administration/swap-memory-management/#good-practice-for-using-swap-in-a-kubernetes-cluster)
174+
164175
<!--
165176
## Developers
166177

content/zh-cn/docs/reference/labels-annotations-taints/_index.md

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2745,8 +2745,6 @@ Type: Label
27452745
Example: `service.kubernetes.io/service-proxy-name: "foo-bar"`
27462746

27472747
Used on: Service
2748-
2749-
The kube-proxy has this label for custom proxy, which delegates service control to custom proxy.
27502748
-->
27512749
### service.kubernetes.io/service-proxy-name {#servicekubernetesioservice-proxy-name}
27522750

@@ -2756,7 +2754,17 @@ The kube-proxy has this label for custom proxy, which delegates service control
27562754
27572755
用于:Service
27582756
2759-
kube-proxy 自定义代理会使用这个标签,它将服务控制委托给自定义代理。
2757+
<!--
2758+
Setting a value for this label tells kube-proxy to ignore this service for proxying purposes.
2759+
This allows for use of alternative proxy implementations for this service (e.g. running
2760+
a DaemonSet that manages nftables its own way). Multiple alternative proxy implementations
2761+
could be active simultaneously using this field, e.g. by having a value unique to each
2762+
alternative proxy implementation to be responsible for their respective services.
2763+
-->
2764+
为这个标签设置一个值会告诉 kube-proxy 在执行代理操作时忽略此 Service。
2765+
这一标签使得用户能够为此 Service 使用替代的代理实现(例如,运行管理 nftables 的 DaemonSet)。
2766+
通过此字段,可以同时激活多个替代代理实现,例如,为每个替代代理实现设置唯一值,
2767+
以负责各自的 Service。
27602768
27612769
<!--
27622770
### experimental.windows.kubernetes.io/isolation-type (deprecated) {#experimental-windows-kubernetes-io-isolation-type}
@@ -3375,13 +3383,6 @@ Type: Annotation
33753383
Example: `scheduler.alpha.kubernetes.io/tolerationsWhitelist: '[{"operator": "Exists", "effect": "NoSchedule", "key": "dedicated-node"}]'`
33763384

33773385
Used on: Namespace
3378-
3379-
This annotation is only useful when the (Alpha)
3380-
[PodTolerationRestriction](/docs/reference/access-authn-authz/admission-controllers/#podtolerationrestriction)
3381-
admission controller is enabled. The annotation value is a JSON document that defines a list of
3382-
allowed tolerations for the namespace it annotates. When you create a Pod or modify its
3383-
tolerations, the API server checks the tolerations to see if they are mentioned in the allow list.
3384-
The pod is admitted only if the check succeeds.
33853386
-->
33863387
### scheduler.alpha.kubernetes.io/tolerationsWhitelist {#schedulerkubernetestolerations-whitelist}
33873388

@@ -3391,6 +3392,14 @@ The pod is admitted only if the check succeeds.
33913392
33923393
用于:命名空间
33933394
3395+
<!--
3396+
This annotation is only useful when the (Alpha)
3397+
[PodTolerationRestriction](/docs/reference/access-authn-authz/admission-controllers/#podtolerationrestriction)
3398+
admission controller is enabled. The annotation value is a JSON document that defines a list of
3399+
allowed tolerations for the namespace it annotates. When you create a Pod or modify its
3400+
tolerations, the API server checks the tolerations to see if they are mentioned in the allow list.
3401+
The pod is admitted only if the check succeeds.
3402+
-->
33943403
此注解只有在启用(Alpha)
33953404
[PodTolerationRestriction](/zh-cn/docs/reference/access-authn-authz/admission-controllers/#podtolerationrestriction)
33963405
控制器时才生效。注解值是一个 JSON 文档,它为它所注解的命名空间定义了一个允许容忍的列表。
@@ -4878,10 +4887,6 @@ Used on: Pod
48784887
This annotation was only relevant if you were using
48794888
[PodSecurityPolicy](/docs/concepts/security/pod-security-policy/) objects.
48804889
Kubernetes v{{< skew currentVersion >}} does not support the PodSecurityPolicy API.
4881-
4882-
When the PodSecurityPolicy admission controller admitted a Pod, the admission controller
4883-
modified the Pod to have this annotation.
4884-
The value of the annotation was the name of the PodSecurityPolicy that was used for validation.
48854890
-->
48864891
### kubernetes.io/psp(已弃用) {#kubernetes-io-psp}
48874892

@@ -4894,6 +4899,11 @@ The value of the annotation was the name of the PodSecurityPolicy that was used
48944899
这个注解只在你使用 [PodSecurityPolicies](/zh-cn/docs/concepts/security/pod-security-policy/) 时才有意义。
48954900
Kubernetes v{{< skew currentVersion >}} 不支持 PodSecurityPolicy API。
48964901

4902+
<!--
4903+
When the PodSecurityPolicy admission controller admitted a Pod, the admission controller
4904+
modified the Pod to have this annotation.
4905+
The value of the annotation was the name of the PodSecurityPolicy that was used for validation.
4906+
-->
48974907
当 PodSecurityPolicy 准入控制器接受一个 Pod 时,会修改该 Pod,并给这个 Pod 添加此注解。
48984908
注解的值是用来对 Pod 进行验证检查的 PodSecurityPolicy 的名称。
48994909

0 commit comments

Comments
 (0)