Update 09-bootstrapping-kubernetes-workers.md
parent
79a3f79b27
commit
146f7c988f
|
@ -138,13 +138,29 @@ sudo mkdir -p /etc/containerd/
|
||||||
|
|
||||||
```
|
```
|
||||||
cat << EOF | sudo tee /etc/containerd/config.toml
|
cat << EOF | sudo tee /etc/containerd/config.toml
|
||||||
[plugins]
|
version = 2
|
||||||
[plugins.cri.containerd]
|
[plugins."io.containerd.grpc.v1.cri".containerd]
|
||||||
snapshotter = "overlayfs"
|
# save disk space when using a single snapshotter
|
||||||
[plugins.cri.containerd.default_runtime]
|
discard_unpacked_layers = true
|
||||||
runtime_type = "io.containerd.runtime.v1.linux"
|
# explicitly use default snapshotter so we can sed it in entrypoint
|
||||||
runtime_engine = "/usr/local/bin/runc"
|
snapshotter = "overlayfs"
|
||||||
runtime_root = ""
|
# explicit default here, as we're configuring it below
|
||||||
|
default_runtime_name = "runc"
|
||||||
|
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
|
||||||
|
# set default runtime handler to v2, which has a per-pod shim
|
||||||
|
runtime_type = "io.containerd.runc.v2"
|
||||||
|
# Setup a runtime with the magic name ("test-handler") used for Kubernetes
|
||||||
|
# runtime class tests ...
|
||||||
|
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.test-handler]
|
||||||
|
runtime_type = "io.containerd.runc.v2"
|
||||||
|
[plugins."io.containerd.grpc.v1.cri"]
|
||||||
|
# use fixed sandbox image
|
||||||
|
sandbox_image = "k8s.gcr.io/pause:3.5"
|
||||||
|
# allow hugepages controller to be missing
|
||||||
|
# see https://github.com/containerd/cri/pull/1501
|
||||||
|
tolerate_missing_hugepages_controller = true
|
||||||
|
# restrict_oom_score_adj needs to be true when running inside UserNS (rootless)
|
||||||
|
restrict_oom_score_adj = false
|
||||||
EOF
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -227,11 +243,11 @@ ExecStart=/usr/local/bin/kubelet \\
|
||||||
--config=/var/lib/kubelet/kubelet-config.yaml \\
|
--config=/var/lib/kubelet/kubelet-config.yaml \\
|
||||||
--container-runtime=remote \\
|
--container-runtime=remote \\
|
||||||
--container-runtime-endpoint=unix:///var/run/containerd/containerd.sock \\
|
--container-runtime-endpoint=unix:///var/run/containerd/containerd.sock \\
|
||||||
--image-pull-progress-deadline=2m \\
|
|
||||||
--kubeconfig=/var/lib/kubelet/kubeconfig \\
|
--kubeconfig=/var/lib/kubelet/kubeconfig \\
|
||||||
--network-plugin=cni \\
|
|
||||||
--register-node=true \\
|
--register-node=true \\
|
||||||
--v=2
|
--v=2 \\
|
||||||
|
--fail-swap-on=false \\
|
||||||
|
--pod-infra-container-image=k8s.gcr.io/pause:3.4.1
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5
|
RestartSec=5
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue