[zh]Update reference pages(part-4) for links with '/zh/' prefix, using new prefix '/zh-cn/'
This commit is contained in:
@@ -35,8 +35,8 @@ files by setting the `KUBECONFIG` environment variable or by setting the
|
||||
-->
|
||||
`针对配置信息,`kubectl` 在 `$HOME/.kube` 目录中查找一个名为 `config` 的配置文件。
|
||||
你可以通过设置 `KUBECONFIG` 环境变量或设置
|
||||
[`--kubeconfig`](/zh/docs/concepts/configuration/organize-cluster-access-kubeconfig/)
|
||||
参数来指定其它 [kubeconfig](/zh/docs/concepts/configuration/organize-cluster-access-kubeconfig/) 文件。
|
||||
[`--kubeconfig`](/zh-cn/docs/concepts/configuration/organize-cluster-access-kubeconfig/)
|
||||
参数来指定其它 [kubeconfig](/zh-cn/docs/concepts/configuration/organize-cluster-access-kubeconfig/) 文件。
|
||||
|
||||
<!--
|
||||
This overview covers `kubectl` syntax, describes the command operations, and provides common examples.
|
||||
@@ -53,10 +53,10 @@ for a quick guide, see the [cheat sheet](/docs/reference/kubectl/cheatsheet/).
|
||||
If you're used to using the `docker` command-line tool, [`kubectl` for Docker Users](/docs/reference/kubectl/docker-cli-to-kubectl/)
|
||||
explains some equivalent commands for Kubernetes.
|
||||
-->
|
||||
有关安装说明,请参见[安装 kubectl](/zh/docs/tasks/tools/#kubectl);
|
||||
如需快速指南,请参见[备忘单](/zh/docs/reference/kubectl/cheatsheet/)。
|
||||
有关安装说明,请参见[安装 kubectl](/zh-cn/docs/tasks/tools/#kubectl);
|
||||
如需快速指南,请参见[备忘单](/zh-cn/docs/reference/kubectl/cheatsheet/)。
|
||||
如果你更习惯使用 `docker` 命令行工具,
|
||||
[Docker 用户的 `kubectl`](/zh/docs/reference/kubectl/docker-cli-to-kubectl/)
|
||||
[Docker 用户的 `kubectl`](/zh-cn/docs/reference/kubectl/docker-cli-to-kubectl/)
|
||||
介绍了一些 Kubernetes 的等价命令。
|
||||
|
||||
<!-- body -->
|
||||
@@ -131,7 +131,7 @@ for example `create`, `get`, `describe`, `delete`.
|
||||
|
||||
* 用一个或多个文件指定资源:`-f file1 -f file2 -f file<#>`
|
||||
|
||||
* [使用 YAML 而不是 JSON](/zh/docs/concepts/configuration/overview/#general-configuration-tips),
|
||||
* [使用 YAML 而不是 JSON](/zh-cn/docs/concepts/configuration/overview/#general-configuration-tips),
|
||||
因为 YAML 对用户更友好, 特别是对于配置文件。<br/>
|
||||
例子:`kubectl get -f ./pod.yaml`
|
||||
|
||||
@@ -341,7 +341,7 @@ Operation | Syntax | Description
|
||||
To learn more about command operations, see the [kubectl](/docs/reference/kubectl/kubectl/) reference documentation.
|
||||
-->
|
||||
了解更多有关命令操作的信息,
|
||||
请参阅 [kubectl](/zh/docs/reference/kubectl/kubectl/) 参考文档。
|
||||
请参阅 [kubectl](/zh-cn/docs/reference/kubectl/kubectl/) 参考文档。
|
||||
|
||||
<!--
|
||||
## Resource types
|
||||
@@ -431,7 +431,7 @@ The following table includes a list of all the supported resource types and thei
|
||||
Use the following sections for information about how you can format or sort the output of certain commands. For details about which commands support the various output options, see the [kubectl](/docs/reference/kubectl/kubectl/) reference documentation.
|
||||
-->
|
||||
有关如何格式化或排序某些命令的输出的信息,请参阅以下章节。有关哪些命令支持不同输出选项的详细信息,
|
||||
请参阅 [kubectl](/zh/docs/reference/kubectl/kubectl/) 参考文档。
|
||||
请参阅 [kubectl](/zh-cn/docs/reference/kubectl/kubectl/) 参考文档。
|
||||
|
||||
<!--
|
||||
### Formatting output
|
||||
@@ -475,8 +475,8 @@ Output format | Description
|
||||
`-o custom-columns=<spec>` | 使用逗号分隔的[自定义列](#custom-columns)列表打印表。
|
||||
`-o custom-columns-file=<filename>` | 使用 `<filename>` 文件中的[自定义列](#custom-columns)模板打印表。
|
||||
`-o json` | 输出 JSON 格式的 API 对象
|
||||
`-o jsonpath=<template>` | 打印 [jsonpath](/zh/docs/reference/kubectl/jsonpath/) 表达式定义的字段
|
||||
`-o jsonpath-file=<filename>` | 打印 `<filename>` 文件中 [jsonpath](/zh/docs/reference/kubectl/jsonpath/) 表达式定义的字段。
|
||||
`-o jsonpath=<template>` | 打印 [jsonpath](/zh-cn/docs/reference/kubectl/jsonpath/) 表达式定义的字段
|
||||
`-o jsonpath-file=<filename>` | 打印 `<filename>` 文件中 [jsonpath](/zh-cn/docs/reference/kubectl/jsonpath/) 表达式定义的字段。
|
||||
`-o name` | 仅打印资源名称而不打印任何其他内容。
|
||||
`-o wide` | 以纯文本格式输出,包含所有附加信息。对于 Pod 包含节点名。
|
||||
`-o yaml` | 输出 YAML 格式的 API 对象。
|
||||
@@ -500,7 +500,7 @@ Remember: See the [kubectl](/docs/reference/kubectl/kubectl/) reference document
|
||||
for details about which output format is supported by each command.
|
||||
-->
|
||||
请记住:有关每个命令支持哪种输出格式的详细信息,
|
||||
请参阅 [kubectl](/zh/docs/reference/kubectl/kubectl/) 参考文档。
|
||||
请参阅 [kubectl](/zh-cn/docs/reference/kubectl/kubectl/) 参考文档。
|
||||
|
||||
<!--
|
||||
#### Custom columns
|
||||
@@ -611,7 +611,7 @@ To output objects to a sorted list in your terminal window, you can add the `--s
|
||||
-->
|
||||
要将对象排序后输出到终端窗口,可以将 `--sort-by` 参数添加到支持的 `kubectl` 命令。
|
||||
通过使用 `--sort-by` 参数指定任何数字或字符串字段来对对象进行排序。
|
||||
要指定字段,请使用 [jsonpath](/zh/docs/reference/kubectl/jsonpath/) 表达式。
|
||||
要指定字段,请使用 [jsonpath](/zh-cn/docs/reference/kubectl/jsonpath/) 表达式。
|
||||
|
||||
<!--
|
||||
#### Syntax
|
||||
@@ -1077,9 +1077,9 @@ Current user: plugins-user
|
||||
* To find out more about plugins, take a look at the [example CLI plugin](https://github.com/kubernetes/sample-cli-plugin).
|
||||
-->
|
||||
* 阅读 `kubectl` 参考文档:
|
||||
* kubectl [命令参考](/zh/docs/reference/kubectl/kubectl/)
|
||||
* kubectl [命令参考](/zh-cn/docs/reference/kubectl/kubectl/)
|
||||
* 参考[命令行参数](/docs/reference/generated/kubectl/kubectl-commands/)
|
||||
* 学习关于 [`kubectl` 使用约定](/zh/docs/reference/kubectl/conventions/)
|
||||
* 阅读 kubectl 中的 [JSONPath 支持](/zh/docs/reference/kubectl/jsonpath/)
|
||||
* 了解如何[使用插件扩展 kubectl](/zh/docs/tasks/extend-kubectl/kubectl-plugins)
|
||||
* 学习关于 [`kubectl` 使用约定](/zh-cn/docs/reference/kubectl/conventions/)
|
||||
* 阅读 kubectl 中的 [JSONPath 支持](/zh-cn/docs/reference/kubectl/jsonpath/)
|
||||
* 了解如何[使用插件扩展 kubectl](/zh-cn/docs/tasks/extend-kubectl/kubectl-plugins)
|
||||
* 查看更多[示例 cli 插件](https://github.com/kubernetes/sample-cli-plugin)。
|
||||
@@ -94,7 +94,7 @@ detailed config file information.
|
||||
## Kubectl 上下文和配置
|
||||
|
||||
设置 `kubectl` 与哪个 Kubernetes 集群进行通信并修改配置信息。
|
||||
查看[使用 kubeconfig 跨集群授权访问](/zh/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)
|
||||
查看[使用 kubeconfig 跨集群授权访问](/zh-cn/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)
|
||||
文档获取配置文件详细信息。
|
||||
|
||||
<!--
|
||||
@@ -790,7 +790,7 @@ kubectl taint nodes foo dedicated=special-user:NoSchedule
|
||||
<!--
|
||||
List all supported resource types along with their shortnames, [API group](/docs/concepts/overview/kubernetes-api/#api-groups-and-versioning), whether they are [namespaced](/docs/concepts/overview/working-with-objects/namespaces), and [Kind](/docs/concepts/overview/working-with-objects/kubernetes-objects):
|
||||
-->
|
||||
列出所支持的全部资源类型和它们的简称、[API 组](/zh/docs/concepts/overview/kubernetes-api/#api-groups-and-versioning), 是否是[名字空间作用域](/zh/docs/concepts/overview/working-with-objects/namespaces) 和 [Kind](/zh/docs/concepts/overview/working-with-objects/kubernetes-objects)。
|
||||
列出所支持的全部资源类型和它们的简称、[API 组](/zh-cn/docs/concepts/overview/kubernetes-api/#api-groups-and-versioning), 是否是[名字空间作用域](/zh-cn/docs/concepts/overview/working-with-objects/namespaces) 和 [Kind](/zh-cn/docs/concepts/overview/working-with-objects/kubernetes-objects)。
|
||||
|
||||
```bash
|
||||
kubectl api-resources
|
||||
@@ -846,8 +846,8 @@ Output format | Description
|
||||
`-o=custom-columns=<spec>` | 使用逗号分隔的自定义列来打印表格
|
||||
`-o=custom-columns-file=<filename>` | 使用 `<filename>` 文件中的自定义列模板打印表格
|
||||
`-o=json` | 输出 JSON 格式的 API 对象
|
||||
`-o=jsonpath=<template>` | 打印 [jsonpath](/zh/docs/reference/kubectl/jsonpath) 表达式中定义的字段
|
||||
`-o=jsonpath-file=<filename>` | 打印在 `<filename>` 文件中定义的 [jsonpath](/zh/docs/reference/kubectl/jsonpath) 表达式所指定的字段。
|
||||
`-o=jsonpath=<template>` | 打印 [jsonpath](/zh-cn/docs/reference/kubectl/jsonpath) 表达式中定义的字段
|
||||
`-o=jsonpath-file=<filename>` | 打印在 `<filename>` 文件中定义的 [jsonpath](/zh-cn/docs/reference/kubectl/jsonpath) 表达式所指定的字段。
|
||||
`-o=name` | 仅打印资源名称而不打印其他内容
|
||||
`-o=wide` | 以纯文本格式输出额外信息,对于 Pod 来说,输出中包含了节点名称
|
||||
`-o=yaml` | 输出 YAML 格式的 API 对象
|
||||
@@ -887,7 +887,7 @@ kubectl get pods -A -o=custom-columns='DATA:spec.containers[?(@.image!="k8s.gcr.
|
||||
kubectl get pods -A -o=custom-columns='DATA:metadata.*'
|
||||
```
|
||||
|
||||
有关更多示例,请参看 kubectl [参考文档](/zh/docs/reference/kubectl/#custom-columns)。
|
||||
有关更多示例,请参看 kubectl [参考文档](/zh-cn/docs/reference/kubectl/#custom-columns)。
|
||||
|
||||
<!--
|
||||
### Kubectl output verbosity and debugging
|
||||
@@ -939,7 +939,7 @@ Verbosity | Description
|
||||
|
||||
* See more community [kubectl cheatsheets](https://github.com/dennyzhang/cheatsheet-kubernetes-A4).
|
||||
-->
|
||||
* 参阅 [kubectl 概述](/zh/docs/reference/kubectl/),进一步了解 [JsonPath](/zh/docs/reference/kubectl/jsonpath)。
|
||||
* 参阅 [kubectl](/zh/docs/reference/kubectl/kubectl/) 选项。
|
||||
* 参阅 [kubectl 使用约定](/zh/docs/reference/kubectl/conventions/)来理解如何在可复用的脚本中使用它。
|
||||
* 参阅 [kubectl 概述](/zh-cn/docs/reference/kubectl/),进一步了解 [JsonPath](/zh-cn/docs/reference/kubectl/jsonpath)。
|
||||
* 参阅 [kubectl](/zh-cn/docs/reference/kubectl/kubectl/) 选项。
|
||||
* 参阅 [kubectl 使用约定](/zh-cn/docs/reference/kubectl/conventions/)来理解如何在可复用的脚本中使用它。
|
||||
* 查看社区中其他的 [kubectl 备忘单](https://github.com/dennyzhang/cheatsheet-kubernetes-A4)。
|
||||
|
||||
@@ -76,7 +76,7 @@ For `kubectl run` to satisfy infrastructure as code:
|
||||
-->
|
||||
|
||||
* 使用特定版本的标签标记镜像,不要将该标签改为新版本。例如使用 `:v1234`、`v1.2.3`、`r03062016-1-4`,
|
||||
而不是 `:latest`(有关详细信息,请参阅[配置的最佳实践](/zh/docs/concepts/configuration/overview/#container-images))。
|
||||
而不是 `:latest`(有关详细信息,请参阅[配置的最佳实践](/zh-cn/docs/concepts/configuration/overview/#container-images))。
|
||||
* 使用基于版本控制的脚本来运行包含大量参数的镜像。
|
||||
* 对于无法通过 `kubectl run` 参数来表示的功能特性,使用基于源码控制的配置文件,以记录要使用的功能特性。
|
||||
|
||||
|
||||
@@ -98,10 +98,10 @@ service "nginx-http" exposed
|
||||
<!--
|
||||
By using kubectl, you can create a [Deployment](/docs/concepts/workloads/controllers/deployment/) to ensure that N pods are running nginx, where N is the number of replicas stated in the spec and defaults to 1. You can also create a [service](/docs/concepts/services-networking/service/) with a selector that matches the pod labels. For more information, see [Use a Service to Access an Application in a Cluster](/docs/tasks/access-application-cluster/service-access-application-cluster).
|
||||
-->
|
||||
在 kubectl 命令中,我们创建了一个 [Deployment](/zh/docs/concepts/workloads/controllers/deployment/),
|
||||
在 kubectl 命令中,我们创建了一个 [Deployment](/zh-cn/docs/concepts/workloads/controllers/deployment/),
|
||||
这将保证有 N 个运行 nginx 的 Pod(N 代表 spec 中声明的 replica 数,默认为 1)。
|
||||
我们还创建了一个 [service](/zh/docs/concepts/services-networking/service/),其选择器与容器标签匹配。
|
||||
查看[使用服务访问集群中的应用程序](/zh/docs/tasks/access-application-cluster/service-access-application-cluster) 获取更多信息。
|
||||
我们还创建了一个 [service](/zh-cn/docs/concepts/services-networking/service/),其选择器与容器标签匹配。
|
||||
查看[使用服务访问集群中的应用程序](/zh-cn/docs/tasks/access-application-cluster/service-access-application-cluster) 获取更多信息。
|
||||
|
||||
<!--
|
||||
By default images run in the background, similar to `docker run -d ...`. To run things in the foreground, use [`kubectl run`](/docs/reference/generated/kubectl/kubectl-commands/#run) to create pod:
|
||||
@@ -280,7 +280,7 @@ kubectl exec -ti nginx-app-5jyvm -- /bin/sh
|
||||
<!--
|
||||
For more information, see [Get a Shell to a Running Container](/docs/tasks/debug/debug-application/get-shell-running-container/).
|
||||
-->
|
||||
更多信息请查看[获取运行中容器的 Shell 环境](/zh/docs/tasks/debug/debug-application/get-shell-running-container/)。
|
||||
更多信息请查看[获取运行中容器的 Shell 环境](/zh-cn/docs/tasks/debug/debug-application/get-shell-running-container/)。
|
||||
|
||||
## docker logs
|
||||
|
||||
@@ -335,7 +335,7 @@ kubectl logs --previous nginx-app-zibvs
|
||||
<!--
|
||||
For more information, see [Logging Architecture](/docs/concepts/cluster-administration/logging/).
|
||||
-->
|
||||
查看[日志架构](/zh/docs/concepts/cluster-administration/logging/)获取更多信息。
|
||||
查看[日志架构](/zh-cn/docs/concepts/cluster-administration/logging/)获取更多信息。
|
||||
|
||||
## docker stop and docker rm
|
||||
|
||||
@@ -417,7 +417,7 @@ When you use kubectl, you don't delete the pod directly. You have to first delet
|
||||
There is no direct analog of `docker login` in kubectl. If you are interested in using Kubernetes with a private registry, see [Using a Private Registry](/docs/concepts/containers/images/#using-a-private-registry).
|
||||
-->
|
||||
在 kubectl 中没有对 `docker login` 的直接模拟。如果你有兴趣在私有镜像仓库中使用 Kubernetes,
|
||||
请参阅[使用私有镜像仓库](/zh/docs/concepts/containers/images/#using-a-private-registry)。
|
||||
请参阅[使用私有镜像仓库](/zh-cn/docs/concepts/containers/images/#using-a-private-registry)。
|
||||
|
||||
## docker version
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ kubectl 管理控制 Kubernetes 集群。
|
||||
<!--
|
||||
Find more information at: https://kubernetes.io/docs/reference/kubectl/overview/
|
||||
-->
|
||||
获取更多信息,请访问 [kubectl 概述](/zh/docs/reference/kubectl/overview/)。
|
||||
获取更多信息,请访问 [kubectl 概述](/zh-cn/docs/reference/kubectl/overview/)。
|
||||
|
||||
```
|
||||
kubectl [flags]
|
||||
|
||||
Reference in New Issue
Block a user