You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The network namespaces of the Pods can be configured with regular CNI plugins.
132
135
For multi-node networking, Flannel (VXLAN, 8472/UDP) is known to work.
133
136
134
137
Ports such as the kubelet port (10250/TCP) and `NodePort` service ports have to be exposed from the Node network namespace to
135
-
the host with an external port forwarder, such as RootlessKit, slirp4netns, or socat.
138
+
the host with an external port forwarder, such as RootlessKit, slirp4netns, or
139
+
[socat(1)](https://linux.die.net/man/1/socat).
136
140
137
-
You can use the port forwarder from K3s; see https://github.com/k3s-io/k3s/blob/v1.21.2+k3s1/pkg/rootlessports/controller.go
141
+
You can use the port forwarder from K3s.
142
+
See [Running K3s in Rootless Mode](https://rancher.com/docs/k3s/latest/en/advanced/#known-issues-with-rootless-mode)
143
+
for more details.
138
144
139
145
### Configuring CRI
140
146
141
-
The kubelet relies on a container runtime. You should deploy a container runtime such as containerd or CRI-O and ensure that it is running within the user namespace before the kubelet starts.
147
+
The kubelet relies on a container runtime. You should deploy a container runtime such as
148
+
containerd or CRI-O and ensure that it is running within the user namespace before the kubelet starts.
142
149
143
150
{{< tabs name="cri" >}}
144
151
{{% tab name="containerd" %}}
145
152
146
153
Running CRI plugin of containerd in a user namespace is supported since containerd 1.4.
147
154
148
-
Running containerd within a user namespace requires the following configuration:
155
+
Running containerd within a user namespace requires the following configurations
156
+
in `/etc/containerd/containerd-config.toml`.
149
157
150
158
```toml
151
159
version = 2
@@ -175,7 +183,7 @@ Running CRI-O in a user namespace is supported since CRI-O 1.22.
175
183
176
184
CRI-O requires an environment variable `_CRIO_ROOTLESS=1` to be set.
177
185
178
-
The following configuration is also recommended:
186
+
The following configurations (in `/etc/crio/crio.conf`) are also recommended:
179
187
180
188
```toml
181
189
[crio]
@@ -197,31 +205,32 @@ The following configuration is also recommended:
197
205
Running kubelet in a user namespace requires the following configuration:
198
206
199
207
```yaml
200
-
kind: KubeletConfiguration
201
208
apiVersion: kubelet.config.k8s.io/v1beta1
209
+
kind: KubeletConfiguration
202
210
featureGates:
203
211
KubeletInUserNamespace: true
204
212
# We use cgroupfs that is delegated by systemd, so we do not use "systemd" driver
205
213
# (unless you run another systemd in the namespace)
206
214
cgroupDriver: "cgroupfs"
207
215
```
208
216
209
-
When the `KubeletInUserNamespace` feature gate is enabled, kubelet ignores errors that may happen during setting the following sysctl values:
217
+
When the `KubeletInUserNamespace` feature gate is enabled, the kubelet ignores errors
218
+
that may happen during setting the following sysctl values on the node.
219
+
210
220
- `vm.overcommit_memory`
211
221
- `vm.panic_on_oom`
212
222
- `kernel.panic`
213
223
- `kernel.panic_on_oops`
214
224
- `kernel.keys.root_maxkeys`
215
225
- `kernel.keys.root_maxbytes`.
216
-
(these are sysctl values for the host, not for the containers).
217
226
218
227
Within a user namespace, the kubelet also ignores any error raised from trying to open `/dev/kmsg`.
219
228
This feature gate also allows kube-proxy to ignore an error during setting `RLIMIT_NOFILE`.
220
229
221
230
The `KubeletInUserNamespace` feature gate was introduced in Kubernetes v1.22 with "alpha" status.
222
231
223
-
Running kubelet in a user namespace without using this feature gate is also possible by mounting a specially crafted proc filesystem,
224
-
but not officially supported.
232
+
Running kubelet in a user namespace without using this feature gate is also possible
233
+
by mounting a specially crafted proc filesystem, but not officially supported.
225
234
226
235
### Configuring kube-proxy
227
236
@@ -251,9 +260,11 @@ For more on this, see the [Caveats and Future work](https://rootlesscontaine.rs/
0 commit comments