add zh pages

This commit is contained in:
Karen Bradshaw
2020-06-01 09:23:39 -04:00
parent 21fd0a12f9
commit 4b35d4d401
303 changed files with 2764 additions and 2439 deletions
@@ -1,29 +1,29 @@
---
title: 访问集群
weight: 20
content_template: templates/concept
content_type: concept
---
<!--
---
title: Accessing Clusters
weight: 20
content_template: templates/concept
content_type: concept
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
This topic discusses multiple ways to interact with clusters.
-->
本文阐述多种与集群交互的方法。
{{% /capture %}}
{{< toc >}}
{{% capture body %}}
<!-- body -->
<!--
## Accessing for the first time with kubectl
@@ -600,4 +600,4 @@ will typically ensure that the latter types are setup correctly.
除了前两种类型之外,Kubernetes 用户通常不需要担心任何其他问题。集群管理员通常会确保后者的正确配置。
{{% /capture %}}
@@ -1,23 +1,24 @@
---
title: 同 Pod 内的容器使用共享卷通信
content_template: templates/task
content_type: task
---
{{% capture overview %}}
<!-- overview -->
本文旨在说明如何让一个 Pod 内的两个容器使用一个卷(Volume)进行通信。
{{% /capture %}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
{{% /capture %}}
{{% capture steps %}}
<!-- steps -->
## 创建一个包含两个容器的 Pod
@@ -111,10 +112,10 @@ Pod 的配置文件如下:
Hello from the debian container
{{% /capture %}}
{{% capture discussion %}}
<!-- discussion -->
## 讨论
@@ -137,10 +138,11 @@ Pod 能有多个容器的主要原因是为了支持辅助应用(helper applic
在本练习中的卷为 Pod 生命周期中的容器相互通信提供了一种方法。如果 Pod 被删除或者重建了,
任何共享卷中的数据都会丢失。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
@@ -161,7 +163,7 @@ Pod 能有多个容器的主要原因是为了支持辅助应用(helper applic
* 参见 [Pod](/docs/api-reference/{{< param "version" >}}/#pod-v1-core).
{{% /capture %}}
@@ -1,10 +1,10 @@
---
title: 配置对多集群的访问
content_template: templates/task
content_type: task
---
{{% capture overview %}}
<!-- overview -->
本文展示如何使用配置文件来配置对多个集群的访问。 在将集群、用户和上下文定义在一个或多个配置文件中之后,用户可以使用 `kubectl config use-context` 命令快速地在集群之间进行切换。
@@ -13,15 +13,16 @@ content_template: templates/task
这是一种引用配置文件的通用方式,并不意味着存在一个名为 `kubeconfig` 的文件。
{{< /note >}}
{{% /capture %}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
需要安装 [`kubectl`](/docs/tasks/tools/install-kubectl/) 命令行工具。
{{% /capture %}}
{{% capture steps %}}
<!-- steps -->
## 定义集群、用户和上下文
@@ -305,14 +306,15 @@ kubectl config view
export KUBECONFIG=$KUBECONFIG_SAVED
```
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
* [使用 kubeconfig 文件组织集群访问](/docs/concepts/configuration/organize-cluster-access-kubeconfig/)
* [kubectl 配置](/docs/user-guide/kubectl/{{< param "version" >}}/)
{{% /capture %}}
@@ -3,11 +3,11 @@ reviewers:
- bprashanth
- davidopp
title: 配置你的云平台防火墙
content_template: templates/task
content_type: task
weight: 90
---
{{% capture overview %}}
<!-- overview -->
<!--
Many cloud providers (e.g. Google Compute Engine) define firewalls that help prevent inadvertent
@@ -18,16 +18,17 @@ well as any provider specific details that may be necessary.
许多云服务提供商(比如 谷歌计算引擎)定义防火墙以防止服务无意间暴露到互联网上。
当暴露服务给外网时,你可能需要在防火墙上开启一个或者更多的端口来支持服务。
本文描述了这个过程,以及其他云服务商的具体信息。
{{% /capture %}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
{{% /capture %}}
{{% capture steps %}}
<!-- steps -->
<!--
## Restrict Access For LoadBalancer Service
-->
@@ -159,4 +160,4 @@ the wilds of the internet.
{{< /note >}}
{{% /capture %}}
@@ -1,27 +1,27 @@
---
title: 为集群配置 DNS
weight: 120
content_template: templates/concept
content_type: concept
---
<!--
---
title: Configure DNS for a Cluster
weight: 120
content_template: templates/concept
content_type: concept
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
Kubernetes offers a DNS cluster addon, which most of the supported environments enable by default.
-->
Kubernetes 提供 DNS 集群插件,大多数支持的环境默认情况下都会启用。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
For more information on how to configure DNS for a Kubernetes cluster, see the [Kubernetes DNS sample plugin.](https://github.com/kubernetes/kubernetes/tree/release-1.5/examples/cluster-dns)
-->
有关如何为 Kubernetes 集群配置 DNS 的详细信息,请参阅 [Kubernetes DNS 插件示例.](https://github.com/kubernetes/kubernetes/tree/release-1.5/examples/cluster-dns)
{{% /capture %}}
@@ -1,10 +1,10 @@
---
title: 使用 Service 把前端连接到后端
content_template: templates/tutorial
content_type: tutorial
---
{{% capture overview %}}
<!-- overview -->
@@ -12,10 +12,11 @@ content_template: templates/tutorial
本任务会描述如何创建前端微服务和后端微服务。后端微服务是一个 hello 欢迎程序。
前端和后端的连接是通过 Kubernetes 服务对象(Service object)完成的。
{{% /capture %}}
{{% capture objectives %}}
## {{% heading "objectives" %}}
@@ -24,10 +25,11 @@ content_template: templates/tutorial
* 从后端将流量路由到前端
* 使用服务对象把前端应用连接到后端应用
{{% /capture %}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
* {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
@@ -36,10 +38,10 @@ content_template: templates/tutorial
所以需要对应的可支持此功能的环境。如果你的环境不能支持,你可以使用
[NodePort](/docs/user-guide/services/#type-nodeport) 类型的服务代替。
{{% /capture %}}
{{% capture lessoncontent %}}
<!-- lessoncontent -->
### 使用部署对象(Deployment)创建后端
@@ -180,16 +182,17 @@ curl http://<EXTERNAL-IP>
{"message":"Hello"}
```
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
* 了解更多 [Services](/docs/concepts/services-networking/service/)
* 了解更多 [ConfigMaps](/docs/tasks/configure-pod-container/configure-pod-configmap/)
{{% /capture %}}
@@ -1,18 +1,18 @@
---
title: 创建一个外部负载均衡器
content_template: templates/task
content_type: task
weight: 80
---
<!--
---
title: Create an External Load Balancer
content_template: templates/task
content_type: task
weight: 80
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
This page shows how to create an External Load Balancer.
@@ -43,15 +43,16 @@ documentation.
-->
有关如何配置和使用 Ingress 资源为服务提供外部可访问的 URL、负载均衡流量、终止 SSL 等功能,请查看 [Ingress](/docs/concepts/services-networking/ingress/) 文档。
{{% /capture %}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
* {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
{{% /capture %}}
{{% capture steps %}}
<!-- steps -->
<!--
## Configuration file
@@ -305,4 +306,4 @@ Internal pod to pod traffic should behave similar to ClusterIP services, with eq
内部 pod 到 pod 的流量应该与 ClusterIP 服务类似,所有 pod 的概率相同。
{{% /capture %}}
@@ -1,18 +1,18 @@
---
title: 列出集群中所有运行容器的镜像
content_template: templates/task
content_type: task
weight: 100
---
<!--
---
title: List All Container Images Running in a Cluster
content_template: templates/task
content_type: task
weight: 100
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
This page shows how to use kubectl to list all of the Container images
@@ -20,15 +20,16 @@ for Pods running in a cluster.
-->
本文展示如何使用 kubectl 来列出集群中所有运行 pod 的容器的镜像
{{% /capture %}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
{{% /capture %}}
{{% capture steps %}}
<!-- steps -->
<!--
In this exercise you will use kubectl to fetch all of the Pods
@@ -170,13 +171,14 @@ kubectl get pods --all-namespaces -o go-template --template="{{range .items}}{{r
{{% /capture %}}
{{% capture discussion %}}
{{% /capture %}}
<!-- discussion -->
## {{% heading "whatsnext" %}}
{{% capture whatsnext %}}
<!--
### Reference
@@ -189,6 +191,6 @@ kubectl get pods --all-namespaces -o go-template --template="{{range .items}}{{r
* [Jsonpath](/docs/user-guide/jsonpath/) 参考指南
* [Go template](https://golang.org/pkg/text/template/) 参考指南
{{% /capture %}}
@@ -1,18 +1,18 @@
---
title: 使用端口转发来访问集群中的应用
content_template: templates/task
content_type: task
weight: 40
---
<!--
---
title: Use Port Forwarding to Access Applications in a Cluster
content_template: templates/task
content_type: task
weight: 40
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
This page shows how to use `kubectl port-forward` to connect to a Redis
@@ -20,10 +20,11 @@ server running in a Kubernetes cluster. This type of connection can be useful
for database debugging.
-->
本文展示如何使用 `kubectl port-forward` 连接到在 Kubernetes 集群中运行的 Redis 服务。这种类型的连接对数据库调试很有用。
{{% /capture %}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
* {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
@@ -32,10 +33,10 @@ for database debugging.
-->
* 安装 [redis-cli](http://redis.io/topics/rediscli)。
{{% /capture %}}
{{% capture steps %}}
<!-- steps -->
<!--
## Creating Redis deployment and service
@@ -210,10 +211,10 @@ for database debugging.
-->
成功的 ping 请求应该返回 PONG。
{{% /capture %}}
{{% capture discussion %}}
<!-- discussion -->
<!--
## Discussion
@@ -236,15 +237,16 @@ The support to UDP protocol is being tracked in
在 [issue 47862](https://github.com/kubernetes/kubernetes/issues/47862) 中正在跟踪对 UDP 协议的支持。
{{< /warning >}}
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
Learn more about [kubectl port-forward](/docs/reference/generated/kubectl/kubectl-commands/#port-forward).
-->
学习更多关于 [kubectl port-forward](/docs/reference/generated/kubectl/kubectl-commands/#port-forward)。
{{% /capture %}}
@@ -1,18 +1,18 @@
---
title: 使用服务来访问集群中的应用
content_template: templates/tutorial
content_type: tutorial
weight: 60
---
<!--
---
title: Use a Service to Access an Application in a Cluster
content_template: templates/tutorial
content_type: tutorial
weight: 60
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
This page shows how to create a Kubernetes Service object that external
@@ -21,17 +21,19 @@ provides load balancing for an application that has two running instances.
-->
本文展示如何创建一个 Kubernetes 服务对象,能让外部客户端访问在集群中运行的应用。该服务为一个应用的两个运行实例提供负载均衡。
{{% /capture %}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
{{% /capture %}}
{{% capture objectives %}}
## {{% heading "objectives" %}}
<!--
* Run two instances of a Hello World application.
@@ -42,10 +44,10 @@ provides load balancing for an application that has two running instances.
* 创建一个服务对象来暴露 node port。
* 使用服务对象来访问正在运行的应用。
{{% /capture %}}
{{% capture lessoncontent %}}
<!-- lessoncontent -->
<!--
## Creating a service for an application running in two pods
@@ -203,10 +205,11 @@ to create a Service.
作为 `kubectl expose` 的替代方法,您可以使用 [服务配置文件](/docs/concepts/services-networking/service/) 来创建服务。
{{% /capture %}}
{{% capture cleanup %}}
## {{% heading "cleanup" %}}
<!--
To delete the Service, enter this command:
@@ -223,14 +226,15 @@ the Hello World application, enter this command:
kubectl delete deployment hello-world
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
Learn more about
[connecting applications with services](/docs/concepts/services-networking/connect-applications-service/).
-->
学习更多关于如何 [通过服务连接应用](/docs/concepts/services-networking/connect-applications-service/)。
{{% /capture %}}
@@ -4,7 +4,7 @@ reviewers:
- mikedanese
- rf232
title: 网页界面 (Dashboard)
content_template: templates/concept
content_type: concept
weight: 10
card:
name: tasks
@@ -18,7 +18,7 @@ reviewers:
- mikedanese
- rf232
title: Web UI (Dashboard)
content_template: templates/concept
content_type: concept
weight: 10
card:
name: tasks
@@ -27,7 +27,7 @@ card:
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
Dashboard is a web-based Kubernetes user interface. You can use Dashboard to deploy containerized applications to a Kubernetes cluster, troubleshoot your containerized application, and manage the cluster resources. You can use Dashboard to get an overview of applications running on your cluster, as well as for creating or modifying individual Kubernetes resources (such as Deployments, Jobs, DaemonSets, etc). For example, you can scale a Deployment, initiate a rolling update, restart a pod or deploy new applications using a deploy wizard.
@@ -40,10 +40,10 @@ Dashboard 同时展示了 Kubernetes 集群中的资源状态信息和所有报
![Kubernetes Dashboard UI](/images/docs/ui-dashboard.png)
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Deploying the Dashboard UI
@@ -369,9 +369,10 @@ Pod 列表和详细信息页面可以链接到 Dashboard 内置的日志查看
-->
![日志浏览](/images/docs/ui-dashboard-logs-view.png)
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
For more information, see the
@@ -380,4 +381,4 @@ For more information, see the
更多信息,参见
[Kubernetes Dashboard 项目页面](https://github.com/kubernetes/dashboard).
{{% /capture %}}