Skip to content

Commit 496a4ff

Browse files
committed
Use sudo for setting sysctl config
1 parent 9a1ec5d commit 496a4ff

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

content/en/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,17 @@ route, we recommend you add IP route(s) so Kubernetes cluster addresses go via t
5656
As a requirement for your Linux Node's iptables to correctly see bridged traffic, you should ensure `net.bridge.bridge-nf-call-iptables` is set to 1 in your `sysctl` config, e.g.
5757

5858
```bash
59-
cat <<EOF > /etc/sysctl.d/k8s.conf
59+
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
6060
net.bridge.bridge-nf-call-ip6tables = 1
6161
net.bridge.bridge-nf-call-iptables = 1
6262
EOF
63-
sysctl --system
63+
sudo sysctl --system
6464
```
6565

66-
Make sure that the `br_netfilter` module is loaded before this step. This can be done by running `lsmod | grep br_netfilter`. To load it explicitly call `modprobe br_netfilter`.
66+
Make sure that the `br_netfilter` module is loaded before this step. This can be done by running `lsmod | grep br_netfilter`. To load it explicitly call `sudo modprobe br_netfilter`.
6767

6868
For more details please see the [Network Plugin Requirements](https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/#network-plugin-requirements) page.
6969

70-
7170
## Check required ports
7271

7372
### Control-plane node(s)
@@ -216,7 +215,7 @@ systemctl enable --now kubelet
216215
- Setting SELinux in permissive mode by running `setenforce 0` and `sed ...` effectively disables it.
217216
This is required to allow containers to access the host filesystem, which is needed by pod networks for example.
218217
You have to do this until SELinux support is improved in the kubelet.
219-
218+
220219
{{% /tab %}}
221220
{{% tab name="Container Linux" %}}
222221
Install CNI plugins (required for most pod network):
@@ -280,8 +279,8 @@ Please mind, that you **only** have to do that if the cgroup driver of your CRI
280279
is not `cgroupfs`, because that is the default value in the kubelet already.
281280

282281
{{< note >}}
283-
Since `--cgroup-driver` flag has been deprecated by kubelet, if you have that in `/var/lib/kubelet/kubeadm-flags.env`
284-
or `/etc/default/kubelet`(`/etc/sysconfig/kubelet` for RPMs), please remove it and use the KubeletConfiguration instead
282+
Since `--cgroup-driver` flag has been deprecated by kubelet, if you have that in `/var/lib/kubelet/kubeadm-flags.env`
283+
or `/etc/default/kubelet`(`/etc/sysconfig/kubelet` for RPMs), please remove it and use the KubeletConfiguration instead
285284
(stored in `/var/lib/kubelet/config.yaml` by default).
286285
{{< /note >}}
287286

0 commit comments

Comments
 (0)