From 982b48e20c41a997247cd62aa6dfae4291afaedc Mon Sep 17 00:00:00 2001 From: Ali Yousefi Sabzevar Date: Tue, 26 Oct 2021 22:24:42 +0200 Subject: [PATCH 1/2] add sudo to Red Hat-based distributions - zh --- content/zh/docs/tasks/tools/install-kubectl-linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/zh/docs/tasks/tools/install-kubectl-linux.md b/content/zh/docs/tasks/tools/install-kubectl-linux.md index 963938a15e..c40bcb88df 100644 --- a/content/zh/docs/tasks/tools/install-kubectl-linux.md +++ b/content/zh/docs/tasks/tools/install-kubectl-linux.md @@ -208,7 +208,7 @@ The following methods exist for installing kubectl on Linux: {{< /tab >}} {{< tab name="基于 Red Hat 的发行版" codelang="bash" >}} -cat < /etc/yum.repos.d/kubernetes.repo +sudo cat < /etc/yum.repos.d/kubernetes.repo [kubernetes] name=Kubernetes baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64 @@ -217,7 +217,7 @@ gpgcheck=1 repo_gpgcheck=1 gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg EOF -yum install -y kubectl +sudo yum install -y kubectl {{< /tab >}} {{< /tabs >}} From 5a5d5584d8a07f043f931000671ef7b188ee850b Mon Sep 17 00:00:00 2001 From: Ali Yousefi Sabzevar Date: Wed, 27 Oct 2021 18:05:19 +0200 Subject: [PATCH 2/2] fix the sudo problem with cat using tee - zh --- content/zh/docs/tasks/tools/install-kubectl-linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/zh/docs/tasks/tools/install-kubectl-linux.md b/content/zh/docs/tasks/tools/install-kubectl-linux.md index c40bcb88df..ffcd7037b0 100644 --- a/content/zh/docs/tasks/tools/install-kubectl-linux.md +++ b/content/zh/docs/tasks/tools/install-kubectl-linux.md @@ -208,7 +208,7 @@ The following methods exist for installing kubectl on Linux: {{< /tab >}} {{< tab name="基于 Red Hat 的发行版" codelang="bash" >}} -sudo cat < /etc/yum.repos.d/kubernetes.repo +cat <