Skip to content

Commit e112954

Browse files
authored
Merge pull request #38844 from windsonsea/verctl
[zh] sync /included/verify-kubectl.md
2 parents 061aa09 + 0d1a62f commit e112954

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

content/zh-cn/docs/tasks/tools/included/verify-kubectl.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,20 @@
22
title: "验证 kubectl 的安装效果"
33
description: "如何验证 kubectl。"
44
headless: true
5+
_build:
6+
list: never
7+
render: never
8+
publishResources: false
59
---
610
<!--
7-
---
811
title: "verify kubectl install"
912
description: "How to verify kubectl."
1013
headless: true
11-
---
12-
-->
14+
_build:
15+
list: never
16+
render: never
17+
publishResources: false
18+
-->
1319

1420
<!--
1521
In order for kubectl to find and access a Kubernetes cluster, it needs a
@@ -20,15 +26,15 @@ or successfully deploy a Minikube cluster.
2026
By default, kubectl configuration is located at `~/.kube/config`.
2127
2228
Check that kubectl is properly configured by getting the cluster state:
23-
-->
29+
-->
2430
为了让 kubectl 能发现并访问 Kubernetes 集群,你需要一个
2531
[kubeconfig 文件](/zh-cn/docs/concepts/configuration/organize-cluster-access-kubeconfig/)
2632
该文件在
2733
[kube-up.sh](https://github.com/kubernetes/kubernetes/blob/master/cluster/kube-up.sh)
2834
创建集群时,或成功部署一个 Miniube 集群时,均会自动生成。
2935
通常,kubectl 的配置信息存放于文件 `~/.kube/config` 中。
3036

31-
通过获取集群状态的方法,检查是否已恰当的配置了 kubectl:
37+
通过获取集群状态的方法,检查是否已恰当地配置了 kubectl:
3238

3339
```shell
3440
kubectl cluster-info
@@ -38,8 +44,8 @@ kubectl cluster-info
3844
If you see a URL response, kubectl is correctly configured to access your cluster.
3945
4046
If you see a message similar to the following, kubectl is not configured correctly or is not able to connect to a Kubernetes cluster.
41-
-->
42-
如果返回一个 URL,则意味着 kubectl 成功的访问到了你的集群
47+
-->
48+
如果返回一个 URL,则意味着 kubectl 成功地访问到了你的集群
4349

4450
如果你看到如下所示的消息,则代表 kubectl 配置出了问题,或无法连接到 Kubernetes 集群。
4551

@@ -52,11 +58,12 @@ The connection to the server <server-name:port> was refused - did you specify th
5258
For example, if you are intending to run a Kubernetes cluster on your laptop (locally), you will need a tool like Minikube to be installed first and then re-run the commands stated above.
5359
5460
If kubectl cluster-info returns the url response but you can't access your cluster, to check whether it is configured properly, use:
55-
-->
56-
例如,如果你想在自己的笔记本上(本地)运行 Kubernetes 集群,你需要先安装一个 Minikube 这样的工具,然后再重新运行上面的命令。
61+
-->
62+
例如,如果你想在自己的笔记本上(本地)运行 Kubernetes 集群,你需要先安装一个 Minikube
63+
这样的工具,然后再重新运行上面的命令。
5764

58-
如果命令 `kubectl cluster-info` 返回了 url,但你还不能访问集群,那可以用以下命令来检查配置是否妥当:
65+
如果命令 `kubectl cluster-info` 返回了 URL,但你还不能访问集群,那可以用以下命令来检查配置是否妥当:
5966

6067
```shell
6168
kubectl cluster-info dump
62-
```
69+
```

0 commit comments

Comments
 (0)