Skip to content

Commit 0bc0d00

Browse files
Update the guide for CentOS, RHEL or Fedora
1 parent 9dc3d79 commit 0bc0d00

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ sudo apt-mark hold kubelet kubeadm kubectl
191191
{{% /tab %}}
192192
{{% tab name="CentOS, RHEL or Fedora" %}}
193193
```bash
194-
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
194+
cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
195195
[kubernetes]
196196
name=Kubernetes
197197
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-\$basearch
@@ -203,12 +203,12 @@ exclude=kubelet kubeadm kubectl
203203
EOF
204204

205205
# Set SELinux in permissive mode (effectively disabling it)
206-
setenforce 0
207-
sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config
206+
sudo setenforce 0
207+
sudo sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config
208208

209-
yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes
209+
sudo yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes
210210

211-
systemctl enable --now kubelet
211+
sudo systemctl enable --now kubelet
212212
```
213213

214214
**Notes:**

0 commit comments

Comments
 (0)