@@ -35,7 +35,7 @@ If you are just looking for how to run a pod as a non-root user, see [SecurityCo
35
35
这种技术也叫做 _ rootless 模式(Rootless mode)_ 。
36
36
37
37
{{< note >}}
38
- 这个文档描述了怎么以非 root 用户身份运行 Kubernetes 节点组件以及 Pod。
38
+ 这个文档描述了怎么以非 root 用户身份运行 Kubernetes 节点组件以及 Pod。
39
39
如果你只是想了解如何以非 root 身份运行 Pod,请参阅 [ SecurityContext] ( /zh/docs/tasks/configure-pod-container/security-context/ ) 。
40
40
{{< /note >}}
41
41
@@ -99,6 +99,51 @@ Rootless Podman is not supported.
99
99
100
100
<!-- Supporting rootless podman is discussed in https://github.com/kubernetes/minikube/issues/8719 -->
101
101
102
+ <!--
103
+ ## Running Kubernetes inside Unprivileged Containers
104
+
105
+ {{% thirdparty-content %}}
106
+
107
+ ### sysbox
108
+
109
+ -->
110
+
111
+ ## 在非特权容器内运行 Kubernetes
112
+
113
+ {{% thirdparty-content %}}
114
+
115
+ ### sysbox
116
+
117
+ <!--
118
+ [Sysbox](https://github.com/nestybox/sysbox) is an open-source container runtime
119
+ (similar to "runc") that supports running system-level workloads such as Docker
120
+ and Kubernetes inside unprivileged containers isolated with the Linux user
121
+ namespace.
122
+ -->
123
+
124
+ [ Sysbox] ( https://github.com/nestybox/sysbox ) 是一个开源容器运行时
125
+ (类似于 “runc”),支持在 Linux 用户命名空间隔离的非特权容器内运行系统级工作负载,
126
+ 比如 Docker 和 Kubernetes。
127
+
128
+ <!--
129
+ See [Sysbox Quick Start Guide: Kubernetes-in-Docker](https://github.com/nestybox/sysbox/blob/master/docs/quickstart/kind.md) for more info.
130
+ -->
131
+
132
+ 查看 [ Sysbox 快速入门指南: Kubernetes-in-Docker] ( https://github.com/nestybox/sysbox/blob/master/docs/quickstart/kind.md )
133
+ 了解更多细节。
134
+
135
+ <!--
136
+ Sysbox supports running Kubernetes inside unprivileged containers without
137
+ requiring Cgroup v2 and without the `KubeletInUserNamespace` feature gate. It
138
+ does this by exposing specially crafted `/proc` and `/sys` filesystems inside
139
+ the container plus several other advanced OS virtualization techniques.
140
+ -->
141
+
142
+ Sysbox 支持在非特权容器内运行 Kubernetes,
143
+ 而不需要 Cgroup v2 和 “KubeletInUserNamespace” 特性门控。
144
+ Sysbox 通过在容器内暴露特定的 ` /proc ` 和 ` /sys ` 文件系统,
145
+ 以及其它一些先进的操作系统虚拟化技术来实现。
146
+
102
147
<!--
103
148
## Running Rootless Kubernetes directly on a host
104
149
@@ -131,7 +176,7 @@ See [the Usernetes repo](https://github.com/rootless-containers/usernetes) for t
131
176
页面中的用法.
132
177
133
178
### Usernetes
134
- [ Usernetes] ( https://github.com/rootless-containers/usernetes ) 是 Kubernetes 的一个参考发行版,
179
+ [ Usernetes] ( https://github.com/rootless-containers/usernetes ) 是 Kubernetes 的一个参考发行版,
135
180
它可以在不使用 root 特权的情况下安装在 ` $HOME ` 目录下。
136
181
137
182
Usernetes 支持使用 containerd 和 CRI-O 作为 CRI 运行时。
@@ -446,7 +491,7 @@ This feature gate also allows kube-proxy to ignore an error during setting `RLIM
446
491
The `KubeletInUserNamespace` feature gate was introduced in Kubernetes v1.22 with "alpha" status.
447
492
448
493
Running kubelet in a user namespace without using this feature gate is also possible
449
- by mounting a specially crafted proc filesystem, but not officially supported.
494
+ by mounting a specially crafted proc filesystem (as done by [Sysbox](https://github.com/nestybox/sysbox)) , but not officially supported.
450
495
-->
451
496
452
497
### 配置 kubelet
@@ -478,7 +523,8 @@ cgroupDriver: "cgroupfs"
478
523
479
524
` KubeletInUserNamespace` 特性门控从 Kubernetes v1.22 被引入, 标记为 "alpha" 状态。
480
525
481
- 通过挂载特制的 proc 文件系统,也可以在不使用这个特性门控的情况下在用户命名空间运行 kubelet,但这不受官方支持。
526
+ 通过挂载特制的 proc 文件系统 (比如 [Sysbox](https://github.com/nestybox/sysbox)),
527
+ 也可以在不使用这个特性门控的情况下在用户命名空间运行 kubelet,但这不受官方支持。
482
528
483
529
<!--
484
530
# ## Configuring kube-proxy
@@ -531,7 +577,7 @@ on the rootlesscontaine.rs website.
531
577
# # 注意事项 {#caveats}
532
578
533
579
- 大部分“非本地”的卷驱动(例如 `nfs` 和 `iscsi`)不能正常工作。
534
- 已知诸如 `local`、`hostPath`、`emptyDir`、`configMap`、`secret` 和 `downwardAPI`
580
+ 已知诸如 `local`、`hostPath`、`emptyDir`、`configMap`、`secret` 和 `downwardAPI`
535
581
这些本地卷是能正常工作的。
536
582
537
583
- 一些 CNI 插件可能不正常工作。已知 Flannel (VXLAN) 是能正常工作的。
0 commit comments