@@ -43,21 +43,21 @@ files by setting the `KUBECONFIG` environment variable or by setting the
43
43
<!--
44
44
This overview covers `kubectl` syntax, describes the command operations, and provides common examples.
45
45
For details about each command, including all the supported flags and subcommands, see the
46
- [kubectl](/docs/reference/generated/kubectl/kubectl-commands/) reference documentation.
46
+ [kubectl](/docs/reference/kubectl/ generated/kubectl/) reference documentation.
47
47
-->
48
48
本文概述了 ` kubectl ` 语法和命令操作描述,并提供了常见的示例。
49
49
有关每个命令的详细信息,包括所有受支持的参数和子命令,
50
- 请参阅 [ kubectl] ( /docs/reference/generated/kubectl/kubectl-commands / ) 参考文档。
50
+ 请参阅 [ kubectl] ( /zh-cn/ docs/reference/kubectl/ generated/kubectl/ ) 参考文档。
51
51
52
52
<!--
53
53
For installation instructions, see [Installing kubectl](/docs/tasks/tools/#kubectl);
54
- for a quick guide, see the [cheat sheet](/docs/reference/kubectl/cheatsheet /).
54
+ for a quick guide, see the [cheat sheet](/docs/reference/kubectl/quick-reference /).
55
55
If you're used to using the `docker` command-line tool,
56
56
[`kubectl` for Docker Users](/docs/reference/kubectl/docker-cli-to-kubectl/)
57
57
explains some equivalent commands for Kubernetes.
58
58
-->
59
59
有关安装说明,请参见[ 安装 kubectl] ( /zh-cn/docs/tasks/tools/#kubectl ) ;
60
- 如需快速指南,请参见[ 备忘单] ( /zh-cn/docs/reference/kubectl/cheatsheet / ) 。
60
+ 如需快速指南,请参见[ 备忘单] ( /zh-cn/docs/reference/kubectl/quick-reference / ) 。
61
61
如果你更习惯使用 ` docker ` 命令行工具,
62
62
[ Docker 用户的 ` kubectl ` ] ( /zh-cn/docs/reference/kubectl/docker-cli-to-kubectl/ )
63
63
介绍了一些 Kubernetes 的等价命令。
@@ -300,14 +300,14 @@ Operation | Syntax | Description
300
300
`scale` | <code>kubectl scale (-f FILENAME | TYPE NAME | TYPE/NAME) --replicas=COUNT [--resource-version=version] [--current-replicas=count] [flags]</code> | Update the size of the specified replication controller.
301
301
`set` | `kubectl set SUBCOMMAND [options]` | Configure application resources.
302
302
`taint` | `kubectl taint NODE NAME KEY_1=VAL_1:TAINT_EFFECT_1 ... KEY_N=VAL_N:TAINT_EFFECT_N [options]` | Update the taints on one or more nodes.
303
- `top` | ` kubectl top (POD | NODE) [flags] [options]` | Display Resource (CPU/Memory/Storage) usage.
303
+ `top` | <code> kubectl top (POD | NODE) [flags] [options]</code> | Display Resource (CPU/Memory/Storage) usage of pod or node .
304
304
`uncordon` | `kubectl uncordon NODE [options]` | Mark node as schedulable.
305
305
`version` | `kubectl version [--client] [flags]` | Display the Kubernetes version running on the client and server.
306
306
`wait` | <code>kubectl wait ([-f FILENAME] | resource.group/resource.name | resource.group [(-l label | --all)]) [--for=delete|--for condition=available] [options]</code> | Experimental: Wait for a specific condition on one or many resources.
307
307
-->
308
308
操作 | 语法 | 描述
309
309
-------------------- | -------------------- | --------------------
310
- ` alpha ` | ` kubectl alpha SUBCOMMAND [flags] ` | 列出与 alpha 特性对应的可用命令 ,这些特性在 Kubernetes 集群中默认情况下是不启用的。
310
+ ` alpha ` | ` kubectl alpha SUBCOMMAND [flags] ` | 列出与 Alpha 级别特性对应的可用命令 ,这些特性在 Kubernetes 集群中默认情况下是不启用的。
311
311
` annotate ` | <code >kubectl annotate (-f FILENAME | ; TYPE NAME | ; TYPE/NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [ --overwrite] [ --all] [ --resource-version=version] [ flags] </code > | 添加或更新一个或多个资源的注解。
312
312
` api-resources ` | ` kubectl api-resources [flags] ` | 列出可用的 API 资源。
313
313
` api-versions ` | ` kubectl api-versions [flags] ` | 列出可用的 API 版本。
@@ -325,7 +325,7 @@ Operation | Syntax | Description
325
325
` create ` | ` kubectl create -f FILENAME [flags] ` | 从文件或 stdin 创建一个或多个资源。
326
326
` delete ` | <code >kubectl delete (-f FILENAME | ; TYPE [ NAME | ; /NAME | ; -l label | ; --all] ) [ flags] </code > | 基于文件、标准输入或通过指定标签选择器、名称、资源选择器或资源本身,删除资源。
327
327
` describe ` | <code >kubectl describe (-f FILENAME | ; TYPE [ NAME_PREFIX | ; /NAME | ; -l label] ) [ flags] </code > | 显示一个或多个资源的详细状态。
328
- ` diff ` | ` kubectl diff -f FILENAME [flags] ` | 在当前起作用的配置和文件或标准输之间作对比 ( ** BETA** )
328
+ ` diff ` | ` kubectl diff -f FILENAME [flags] ` | 在当前起作用的配置和文件或标准输之间作对比( ** BETA** )
329
329
` drain ` | ` kubectl drain NODE [options] ` | 腾空节点以准备维护。
330
330
` edit ` | <code >kubectl edit (-f FILENAME | ; TYPE NAME | ; TYPE/NAME) [ flags] </code > | 使用默认编辑器编辑和更新服务器上一个或多个资源的定义。
331
331
` events ` | ` kubectl events ` | 列举事件。
@@ -347,7 +347,7 @@ Operation | Syntax | Description
347
347
` scale ` | <code >kubectl scale (-f FILENAME | ; TYPE NAME | ; TYPE/NAME) --replicas=COUNT [ --resource-version=version] [ --current-replicas=count] [ flags] </code > | 更新指定副本控制器的大小。
348
348
` set ` | ` kubectl set SUBCOMMAND [options] ` | 配置应用资源。
349
349
` taint ` | ` kubectl taint NODE NAME KEY_1=VAL_1:TAINT_EFFECT_1 ... KEY_N=VAL_N:TAINT_EFFECT_N [options] ` | 更新一个或多个节点上的污点。
350
- ` top ` | ` kubectl top (POD | NODE) [flags] [options] ` | 显示资源 (CPU、内存、 存储)的使用情况 。
350
+ ` top ` | < code > kubectl top (POD &# 124 ; NODE) [ flags] [ options] </ code > | 显示 Pod 或节点的资源 (CPU/内存/ 存储)使用情况 。
351
351
` uncordon ` | ` kubectl uncordon NODE [options] ` | 将节点标记为可调度。
352
352
` version ` | ` kubectl version [--client] [flags] ` | 显示运行在客户端和服务器上的 Kubernetes 版本。
353
353
` wait ` | <code >kubectl wait ([ -f FILENAME] | ; resource.group/resource.name | ; resource.group [ (-l label | ; --all)] ) [ --for=delete| ; --for condition=available] [ options] </code > | 实验特性:等待一种或多种资源的特定状况。
@@ -839,7 +839,6 @@ kubectl exec <pod-name> -c <container-name> -- date
839
839
# Get an interactive TTY and run /bin/bash from pod <pod-name>. By default, output is from the first container.
840
840
kubectl exec -ti <pod-name> -- /bin/bash
841
841
-->
842
-
843
842
``` shell
844
843
# 从 Pod <pod-name> 中获取运行 'date' 的输出。默认情况下,输出来自第一个容器。
845
844
kubectl exec < pod-name> -- date
@@ -963,6 +962,7 @@ kubectl hello
963
962
```
964
963
hello world
965
964
```
965
+
966
966
<!--
967
967
```shell
968
968
# You can "uninstall" a plugin, by removing it from the folder in your
@@ -1089,15 +1089,15 @@ Current user: plugins-user
1089
1089
<!--
1090
1090
* Read the `kubectl` reference documentation:
1091
1091
* the kubectl [command reference](/docs/reference/kubectl/kubectl/)
1092
- * the [command line arguments](/docs/reference/generated/kubectl/kubectl-commands /) reference
1092
+ * the [command line arguments](/docs/reference/kubectl/ generated/kubectl/) reference
1093
1093
* Learn about [`kubectl` usage conventions](/docs/reference/kubectl/conventions/)
1094
1094
* Read about [JSONPath support](/docs/reference/kubectl/jsonpath/) in kubectl
1095
1095
* Read about how to [extend kubectl with plugins](/docs/tasks/extend-kubectl/kubectl-plugins)
1096
1096
* To find out more about plugins, take a look at the [example CLI plugin](https://github.com/kubernetes/sample-cli-plugin).
1097
1097
-->
1098
1098
* 阅读 ` kubectl ` 参考文档:
1099
1099
* kubectl [ 命令参考] ( /zh-cn/docs/reference/kubectl/kubectl/ )
1100
- * 参考[ 命令行参数] ( /docs/reference/generated/kubectl/kubectl-commands / )
1100
+ * 参考[ 命令行参数] ( /docs/reference/kubectl/ generated/kubectl/ )
1101
1101
* 学习关于 [ ` kubectl ` 使用约定] ( /zh-cn/docs/reference/kubectl/conventions/ )
1102
1102
* 阅读 kubectl 中的 [ JSONPath 支持] ( /zh-cn/docs/reference/kubectl/jsonpath/ )
1103
1103
* 了解如何[ 使用插件扩展 kubectl] ( /zh-cn/docs/tasks/extend-kubectl/kubectl-plugins )
0 commit comments