Skip to content

Commit 754f3da

Browse files
committed
[zh] Sync tasks/tools/install-kubectl.md
1 parent 1e38b53 commit 754f3da

File tree

1 file changed

+31
-14
lines changed

1 file changed

+31
-14
lines changed

content/zh/docs/tasks/tools/install-kubectl.md

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,24 @@ card:
2121

2222
<!-- overview -->
2323
<!--
24-
Use the Kubernetes command-line tool, [kubectl](/docs/user-guide/kubectl/), to deploy and manage applications on Kubernetes. Using kubectl, you can inspect cluster resources; create, delete, and update components; look at your new cluster; and bring up example apps.
24+
The Kubernetes command-line tool, [kubectl](/docs/reference/kubectl/kubectl/), allows
25+
you to run commands against Kubernetes clusters.
26+
You can use kubectl to deploy applications, inspect and manage cluster resources,
27+
and view logs. For a complete list of kubectl operations, see
28+
[Overview of kubectl](/docs/reference/kubectl/overview/).
2529
-->
26-
在 Kubernetes 上使用 Kubernetes 命令行工具 [kubectl](/zh/docs/reference/kubectl/kubectl/)
27-
部署和管理应用程序。
28-
使用 kubectl,你可以检查集群资源;创建、删除和更新组件;查看你的新集群;并启动实例应用程序。
30+
使用 Kubernetes 命令行工具 [kubectl](/zh/docs/reference/kubectl/kubectl/)
31+
你可以在 Kubernetes 上运行命令。
32+
使用 kubectl,你可以部署应用、检查和管理集群资源、查看日志。
33+
要了解 kubectl 操作的完整列表,请参阅
34+
[kubectl 概览](/zh/docs/reference/kubectl/overview/)
2935

3036
## {{% heading "prerequisites" %}}
3137

3238
<!--
33-
You must use a kubectl version that is within one minor version difference of your cluster. For example, a v1.2 client should work with v1.1, v1.2, and v1.3 master. Using the latest version of kubectl helps avoid unforeseen issues.
39+
You must use a kubectl version that is within one minor version difference of your cluster.
40+
For example, a v1.2 client should work with v1.1, v1.2, and v1.3 master.
41+
Using the latest version of kubectl helps avoid unforeseen issues.
3442
-->
3543
你必须使用与集群小版本号差别为一的 kubectl 版本。
3644
例如,1.2 版本的客户端应该与 1.1 版本、1.2 版本和 1.3 版本的主节点一起使用。
@@ -104,7 +112,7 @@ You must use a kubectl version that is within one minor version difference of yo
104112

105113
{{< tabs name="kubectl_install" >}}
106114
{{< tab name="Ubuntu、Debian 或 HypriotOS" codelang="bash" >}}
107-
sudo apt-get update && sudo apt-get install -y apt-transport-https
115+
sudo apt-get update && sudo apt-get install -y apt-transport-https gnupg2 curl
108116
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
109117
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
110118
sudo apt-get update
@@ -306,7 +314,7 @@ If you are on macOS and using [Macports](https://macports.org/) package manager,
306314
<!--
307315
2. Add the binary in to your PATH.
308316
-->
309-
2. 将二进制文件放到 PATH 目录下。
317+
2. 将可执行文件放到 PATH 目录下。
310318

311319
<!--
312320
3. Test to ensure the version of `kubectl` is the same as downloaded:
@@ -483,15 +491,22 @@ kubectl 可以作为 Google Cloud SDK 的一部分进行安装。
483491
<!--
484492
## Verifying kubectl configuration
485493
486-
In order for kubectl to find and access a Kubernetes cluster, it needs a [kubeconfig file](/docs/tasks/access-application-cluster/configure-access-multiple-clusters/), which is created automatically when you create a cluster using kube-up.sh or successfully deploy a Minikube cluster. See the [getting started guides](/docs/setup/) for more about creating clusters. If you need access to a cluster you didn't create, see the [Sharing Cluster Access document](/docs/tasks/access-application-cluster/configure-access-multiple-clusters/).
494+
In order for kubectl to find and access a Kubernetes cluster, it needs a
495+
[kubeconfig file](/docs/concepts/configuration/organize-cluster-access-kubeconfig/),
496+
which is created automatically when you create a cluster using
497+
[kube-up.sh](https://github.com/kubernetes/kubernetes/blob/master/cluster/kube-up.sh)
498+
or successfully deploy a Minikube cluster.
487499
By default, kubectl configuration is located at `~/.kube/config`.
488500
-->
489501
## 验证 kubectl 配置 {#verifying-kubectl-configuration}
490502

491503
kubectl 需要一个
492504
[kubeconfig 配置文件](/zh/docs/concepts/configuration/organize-cluster-access-kubeconfig/)
493-
使其找到并访问 Kubernetes 集群。
494-
当你使用 kube-up.sh 脚本创建 Kubernetes 集群或者部署 Minikube 集群时,会自动生成 kubeconfig 配置文件。
505+
使其找到并访问 Kubernetes 集群。当你使用
506+
[kube-up.sh](https://github.com/kubernetes/kubernetes/blob/master/cluster/kube-up.sh)
507+
创建 Kubernetes 集群或者使用已经部署好的 Minikube 集群时,
508+
会自动生成 kubeconfig 配置文件。
509+
默认情况下,kubectl 的配置文件位于 `~/.kube/config`
495510

496511
<!--
497512
Check that kubectl is properly configured by getting the cluster state:
@@ -874,15 +889,17 @@ compinit
874889
## {{% heading "whatsnext" %}}
875890

876891
<!--
877-
* [Install Minikube](/docs/tasks/tools/install-minikube/)
892+
* [Install Minikube](https://minikube.sigs.k8s.io/docs/start/)
878893
* See the [getting started guides](/docs/setup/) for more about creating clusters.
879894
* [Learn how to launch and expose your application.](/docs/tasks/access-application-cluster/service-access-application-cluster/)
880-
* If you need access to a cluster you didn't create, see the [Sharing Cluster Access document](/docs/tasks/access-application-cluster/configure-access-multiple-clusters/).
895+
* If you need access to a cluster you didn't create, see the
896+
[Sharing Cluster Access document](/docs/tasks/access-application-cluster/configure-access-multiple-clusters/).
881897
* Read the [kubectl reference docs](/docs/reference/kubectl/kubectl/)
882898
-->
883-
* [安装 Minikube](/zh/docs/tasks/tools/install-minikube/)
899+
* [安装 Minikube](https://minikube.sigs.k8s.io/docs/start/)
884900
* 参阅[入门指南](/zh/docs/setup/),了解创建集群相关的信息
885901
* 了解如何[启动和暴露你的应用](/zh/docs/tasks/access-application-cluster/service-access-application-cluster/)
886-
* 如果你需要访问别人创建的集群,参考[共享集群访问文档](/zh/docs/tasks/access-application-cluster/configure-access-multiple-clusters/).
902+
* 如果你需要访问别人创建的集群,参考
903+
[共享集群访问文档](/zh/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)
887904
* 阅读 [kubectl 参考文档](/zh/docs/reference/kubectl/kubectl/)
888905

0 commit comments

Comments
 (0)