add zh pages
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
<!--
|
||||
---
|
||||
title: Assign CPU Resources to Containers and Pods
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 20
|
||||
---
|
||||
-->
|
||||
|
||||
---
|
||||
title: 为容器和 Pods 分配 CPU 资源
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 20
|
||||
---
|
||||
|
||||
{{% capture overview %}}
|
||||
<!-- overview -->
|
||||
|
||||
<!--
|
||||
This page shows how to assign a CPU *request* and a CPU *limit* to
|
||||
@@ -23,10 +23,11 @@ allocated as much CPU as it requests.
|
||||
此页面显示如何将 CPU *request* 和 CPU *limit* 分配给一个容器。容器使用的 CPU 不能超过配额限制。
|
||||
如果系统有空闲的 CPU 时间,则可以保证根据请求给容器分配尽可能多的 CPU 资源。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
{{% capture prerequisites %}}
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
|
||||
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
|
||||
@@ -76,10 +77,10 @@ NAME
|
||||
v1beta1.metrics.k8s.io
|
||||
```
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
{{% capture steps %}}
|
||||
|
||||
<!-- steps -->
|
||||
|
||||
|
||||
<!--
|
||||
@@ -405,9 +406,10 @@ Delete your namespace:
|
||||
kubectl delete namespace cpu-example
|
||||
```
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture whatsnext %}}
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
|
||||
<!--
|
||||
### For app developers
|
||||
@@ -456,5 +458,5 @@ kubectl delete namespace cpu-example
|
||||
|
||||
* [配置 API 对象的配额](/docs/tasks/administer-cluster/quota-api-object/)
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
---
|
||||
title: 为容器和 Pod 分配内存资源
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 10
|
||||
---
|
||||
|
||||
<!--
|
||||
---
|
||||
title: Assign Memory Resources to Containers and Pods
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 10
|
||||
---
|
||||
-->
|
||||
|
||||
{{% capture overview %}}
|
||||
<!-- overview -->
|
||||
|
||||
<!--
|
||||
This page shows how to assign a memory *request* and a memory *limit* to a
|
||||
@@ -21,10 +21,11 @@ but is not allowed to use more memory than its limit.
|
||||
-->
|
||||
此页面显示如何将内存 *请求* (request)和内存 *限制* (limit)分配给一个容器。我们保障容器拥有它请求数量的内存,但不允许使用超过限制数量的内存。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
{{% capture prerequisites %}}
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
|
||||
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
|
||||
@@ -72,9 +73,9 @@ NAME
|
||||
v1beta1.metrics.k8s.io
|
||||
```
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture steps %}}
|
||||
|
||||
<!-- steps -->
|
||||
|
||||
<!--
|
||||
## Create a namespace
|
||||
@@ -507,9 +508,10 @@ Delete your namespace. This deletes all the Pods that you created for this task:
|
||||
kubectl delete namespace mem-example
|
||||
```
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture whatsnext %}}
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
|
||||
### 应用开发者扩展阅读
|
||||
|
||||
@@ -533,7 +535,7 @@ kubectl delete namespace mem-example
|
||||
|
||||
* [配置 API 对象配额](/docs/tasks/administer-cluster/quota-api-object/)
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,31 +1,32 @@
|
||||
---
|
||||
title: 将 Pod 分配给节点
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 120
|
||||
---
|
||||
<!--
|
||||
---
|
||||
title: Assign Pods to Nodes
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 120
|
||||
---
|
||||
-->
|
||||
|
||||
{{% capture overview %}}
|
||||
<!-- overview -->
|
||||
<!--
|
||||
This page shows how to assign a Kubernetes Pod to a particular node in a
|
||||
Kubernetes cluster.
|
||||
-->
|
||||
此页面显示如何将 Kubernetes Pod 分配给 Kubernetes 集群中的特定节点。
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture prerequisites %}}
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
|
||||
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture steps %}}
|
||||
|
||||
<!-- steps -->
|
||||
|
||||
<!--
|
||||
## Add a label to a node
|
||||
@@ -123,13 +124,14 @@ a `disktype=ssd` label.
|
||||
NAME READY STATUS RESTARTS AGE IP NODE
|
||||
nginx 1/1 Running 0 13s 10.200.0.4 worker0
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture whatsnext %}}
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
<!--
|
||||
Learn more about
|
||||
[labels and selectors](/docs/concepts/overview/working-with-objects/labels/).
|
||||
-->
|
||||
了解更多关于
|
||||
[标签和选择器](/docs/concepts/overview/working-with-objects/labels/)。
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
---
|
||||
title: 为容器的生命周期事件设置处理函数
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 140
|
||||
---
|
||||
<!--
|
||||
---
|
||||
title: Attach Handlers to Container Lifecycle Events
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 140
|
||||
---
|
||||
-->
|
||||
|
||||
{{% capture overview %}}
|
||||
<!-- overview -->
|
||||
|
||||
<!--
|
||||
This page shows how to attach handlers to Container lifecycle events. Kubernetes supports
|
||||
@@ -23,16 +23,17 @@ Container is terminated.
|
||||
当一个容器启动后,Kubernetes 将立即发送 postStart 事件;在容器被终结之前,
|
||||
Kubernetes 将发送一个 preStop 事件。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
{{% capture prerequisites %}}
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
|
||||
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture steps %}}
|
||||
|
||||
<!-- steps -->
|
||||
|
||||
<!--
|
||||
## Define postStart and preStop handlers
|
||||
@@ -95,11 +96,11 @@ The output shows the text written by the postStart handler:
|
||||
|
||||
Hello from the postStart handler
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
|
||||
{{% capture discussion %}}
|
||||
|
||||
<!-- discussion -->
|
||||
|
||||
<!--
|
||||
## Discussion
|
||||
@@ -142,10 +143,11 @@ preStop 的事件处理逻辑不会被触发。这个限制在
|
||||
[issue #55087](https://github.com/kubernetes/kubernetes/issues/55807) 中被追踪。
|
||||
{{< /note >}}
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
{{% capture whatsnext %}}
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
|
||||
<!--
|
||||
* Learn more about [Container lifecycle hooks](/docs/concepts/containers/container-lifecycle-hooks/).
|
||||
@@ -168,6 +170,6 @@ preStop 的事件处理逻辑不会被触发。这个限制在
|
||||
* [Container](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#container-v1-core)
|
||||
* 参阅 [PodSpec](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podspec-v1-core) 中关于`terminationGracePeriodSeconds` 的部分
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
|
||||
|
||||
+11
-9
@@ -1,10 +1,10 @@
|
||||
---
|
||||
title: 配置存活、就绪和启动探测器
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 110
|
||||
---
|
||||
|
||||
{{% capture overview %}}
|
||||
<!-- overview -->
|
||||
<!--
|
||||
This page shows how to configure liveness, readiness and startup probes for Containers.
|
||||
|
||||
@@ -34,15 +34,16 @@ kubelet 使用就绪探测器可以知道容器什么时候准备好了并可以
|
||||
|
||||
kubelet 使用启动探测器可以知道应用程序容器什么时候启动了。如果配置了这类探测器,就可以控制容器在启动成功后再进行存活性和就绪检查,确保这些存活、就绪探测器不会影响应用程序的启动。这可以用于对慢启动容器进行存活性检测,避免它们在启动运行之前就被杀掉。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture prerequisites %}}
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
|
||||
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture steps %}}
|
||||
|
||||
<!-- steps -->
|
||||
|
||||
<!--
|
||||
## Define a liveness command
|
||||
@@ -505,9 +506,10 @@ to resolve it.
|
||||
|
||||
对于一次 TCP 探测,kubelet 在节点上(不是在 Pod 里面)建立探测连接,这意味着你不能在 `host` 参数上配置 service name,因为 kubelet 不能解析 service name。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture whatsnext %}}
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
|
||||
<!--
|
||||
* Learn more about
|
||||
@@ -527,4 +529,4 @@ to resolve it.
|
||||
* [容器](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#container-v1-core)
|
||||
* [探测器](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#probe-v1-core)
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
+14
-12
@@ -1,18 +1,18 @@
|
||||
---
|
||||
title: 配置 Pod 以使用 PersistentVolume 作为存储
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 60
|
||||
---
|
||||
|
||||
<!--
|
||||
---
|
||||
title: Configure a Pod to Use a PersistentVolume for Storage
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 60
|
||||
---
|
||||
-->
|
||||
|
||||
{{% capture overview %}}
|
||||
<!-- overview -->
|
||||
|
||||
<!--
|
||||
This page shows how to configure a Pod to use a PersistentVolumeClaim for storage.
|
||||
@@ -36,9 +36,10 @@ bound to a suitable PersistentVolume.
|
||||
|
||||
1. 用户创建一个使用 PersistentVolumeClaim 作为存储的 Pod。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture prerequisites %}}
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
|
||||
<!--
|
||||
* You need to have a Kubernetes cluster that has only one Node, and the kubectl
|
||||
@@ -55,9 +56,9 @@ do not already have a single-node cluster, you can create one by using
|
||||
|
||||
* 熟悉[持久卷](/docs/concepts/storage/persistent-volumes/)中的材料。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture steps %}}
|
||||
|
||||
<!-- steps -->
|
||||
|
||||
<!--
|
||||
## Create an index.html file on your Node
|
||||
@@ -293,10 +294,10 @@ hostPath volume:
|
||||
|
||||
Hello from Kubernetes storage
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
{{% capture discussion %}}
|
||||
|
||||
<!-- discussion -->
|
||||
|
||||
<!--
|
||||
## Access control
|
||||
@@ -347,10 +348,11 @@ PersistentVolume are not present on the Pod resource itself.
|
||||
当 Pod 使用 PersistentVolume 时,与 PersistentVolume 关联的 GID 不会在 Pod 本身的资源对象上出现。
|
||||
{{< /note >}}
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
{{% capture whatsnext %}}
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
|
||||
<!--
|
||||
* Learn more about [PersistentVolumes](/docs/concepts/storage/persistent-volumes/).
|
||||
@@ -372,4 +374,4 @@ PersistentVolume are not present on the Pod resource itself.
|
||||
* [PersistentVolumeClaimSpec](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#persistentvolumeclaimspec-v1-core)
|
||||
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 使用 ConfigMap 配置 Pod
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 150
|
||||
card:
|
||||
name: tasks
|
||||
@@ -8,26 +8,27 @@ card:
|
||||
---
|
||||
<!-- ---
|
||||
title: Configure a Pod to Use a ConfigMap
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 150
|
||||
card:
|
||||
name: tasks
|
||||
weight: 50
|
||||
--- -->
|
||||
|
||||
{{% capture overview %}}
|
||||
<!-- overview -->
|
||||
<!-- ConfigMaps allow you to decouple configuration artifacts from image content to keep containerized applications portable. This page provides a series of usage examples demonstrating how to create ConfigMaps and configure Pods using data stored in ConfigMaps. -->
|
||||
ConfigMap 允许您将配置文件与镜像文件分离,以使容器化的应用程序具有可移植性。该页面提供了一系列使用示例,这些示例演示了如何使用存储在 ConfigMap 中的数据创建 ConfigMap 和配置 Pod。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture prerequisites %}}
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
|
||||
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture steps %}}
|
||||
|
||||
<!-- steps -->
|
||||
|
||||
|
||||
<!-- ## Create a ConfigMap
|
||||
@@ -756,9 +757,9 @@ basis. The [Secrets](/docs/concepts/configuration/secret/#using-secrets-as-files
|
||||
使用 ConfigMap 作为子路径[subPath](/docs/concepts/storage/volumes/#using-subpath)的容器将不会收到 ConfigMap 更新。
|
||||
{{< /note >}}
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture discussion %}}
|
||||
|
||||
<!-- discussion -->
|
||||
|
||||
<!-- ## Understanding ConfigMaps and Pods -->
|
||||
## 了解 ConfigMap 和 Pod
|
||||
@@ -824,11 +825,12 @@ ConfigMap 驻留在特定的[命令空间](/docs/concepts/overview/working-with-
|
||||
这些不是创建 pods 的常用方法。
|
||||
{{< /note >}}
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture whatsnext %}}
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
<!-- * Follow a real world example of [Configuring Redis using a ConfigMap](/docs/tutorials/configuration/configure-redis-using-configmap/). -->
|
||||
* 遵循[使用ConfigMap配置Redis](/docs/tutorials/configuration/configure-redis-using-configmap/)的真实案例。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
|
||||
@@ -1,32 +1,33 @@
|
||||
---
|
||||
title: 配置 Pod 初始化
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 130
|
||||
---
|
||||
|
||||
<!--
|
||||
---
|
||||
title: Configure Pod Initialization
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 130
|
||||
---
|
||||
-->
|
||||
|
||||
{{% capture overview %}}
|
||||
<!-- overview -->
|
||||
<!--
|
||||
This page shows how to use an Init Container to initialize a Pod before an
|
||||
application Container runs.
|
||||
-->
|
||||
本文介绍在应用容器运行前,怎样利用 Init 容器初始化 Pod。
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture prerequisites %}}
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
|
||||
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture steps %}}
|
||||
|
||||
<!-- steps -->
|
||||
|
||||
<!--
|
||||
## Create a Pod that has an Init Container
|
||||
@@ -129,9 +130,10 @@ The output shows that nginx is serving the web page that was written by the init
|
||||
<p>Kubernetes is open source giving you the freedom to take advantage ...</p>
|
||||
...
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture whatsnext %}}
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
|
||||
<!--
|
||||
* Learn more about
|
||||
@@ -146,6 +148,6 @@ The output shows that nginx is serving the web page that was written by the init
|
||||
* 进一步了解 [卷](/docs/concepts/storage/volumes/)。
|
||||
* 进一步了解 [Init 容器排错](/docs/tasks/debug-application-cluster/debug-init-containers/)。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
|
||||
|
||||
+12
-10
@@ -3,7 +3,7 @@ reviewers:
|
||||
- jpeeler
|
||||
- pmorie
|
||||
title: 配置 Pod 使用投射卷作存储
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 70
|
||||
---
|
||||
|
||||
@@ -13,12 +13,12 @@ reviewers:
|
||||
- jpeeler
|
||||
- pmorie
|
||||
title: Configure a Pod to Use a Projected Volume for Storage
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 70
|
||||
---
|
||||
-->
|
||||
|
||||
{{% capture overview %}}
|
||||
<!-- overview -->
|
||||
<!--
|
||||
This page shows how to use a [`projected`](/docs/concepts/storage/volumes/#projected) volume to mount
|
||||
several existing volume sources into the same directory. Currently, `secret`, `configMap`, `downwardAPI`,
|
||||
@@ -34,13 +34,14 @@ and `serviceAccountToken` volumes can be projected.
|
||||
-->
|
||||
`serviceAccountToken` 不是一种卷类型
|
||||
{{< /note >}}
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture prerequisites %}}
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture steps %}}
|
||||
|
||||
<!-- steps -->
|
||||
|
||||
<!--
|
||||
## Configure a projected volume for a pod
|
||||
@@ -95,9 +96,10 @@ the Pod:-->确认 Pod 中的容器运行正常,然后监视 Pod 的变化:
|
||||
```shell
|
||||
ls /projected-volume/
|
||||
```
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture whatsnext %}}
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
|
||||
<!--
|
||||
* Learn more about [`projected`](/docs/concepts/storage/volumes/#projected) volumes.
|
||||
@@ -106,5 +108,5 @@ the Pod:-->确认 Pod 中的容器运行正常,然后监视 Pod 的变化:
|
||||
|
||||
* 进一步了解[`投射`](/docs/concepts/storage/volumes/#projected) 卷。
|
||||
* 阅读[一体卷](https://github.com/kubernetes/community/blob/{{< param "githubbranch" >}}/contributors/design-proposals/node/all-in-one-volume.md)设计文档。
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
---
|
||||
title: 为 Windows 的 pod 和容器配置 RunAsUserName
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 20
|
||||
---
|
||||
|
||||
<!--
|
||||
---
|
||||
title: Configure RunAsUserName for Windows pods and containers
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 20
|
||||
---
|
||||
-->
|
||||
|
||||
{{% capture overview %}}
|
||||
<!-- overview -->
|
||||
|
||||
{{< feature-state for_k8s_version="v1.17" state="beta" >}}
|
||||
|
||||
@@ -29,9 +29,10 @@ This feature is in beta. The overall functionality for `RunAsUserName` will not
|
||||
该功能目前处于 beta 状态。 `RunAsUserName` 的整体功能不会出现变更,但是关于用户名验证的部分可能会有所更改。
|
||||
{{< /note >}}
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture prerequisites %}}
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
|
||||
<!--
|
||||
You need to have a Kubernetes cluster and the kubectl command-line tool must be configured to communicate with your cluster. The cluster is expected to have Windows worker nodes where pods with containers running Windows workloads will get scheduled.
|
||||
@@ -217,9 +218,10 @@ For more information about these limtations, check [here](https://support.micros
|
||||
|
||||
关于这些限制的更多信息,可以查看[这里](https://support.microsoft.com/en-us/help/909264/naming-conventions-in-active-directory-for-computers-domains-sites-and)和[这里](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.localaccounts/new-localuser?view=powershell-5.1)。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture whatsnext %}}
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
|
||||
<!--
|
||||
* [Guide for scheduling Windows containers in Kubernetes](/docs/setup/production-environment/windows/user-guide-windows-containers/)
|
||||
@@ -231,4 +233,4 @@ For more information about these limtations, check [here](https://support.micros
|
||||
* [使用组托管服务帐户(GMSA)管理工作负载身份](/docs/setup/production-environment/windows/user-guide-windows-containers/#managing-workload-identity-with-group-managed-service-accounts)
|
||||
* [Windows 下 pod 和容器的 GMSA 配置](/docs/tasks/configure-pod-container/configure-gmsa/)
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ reviewers:
|
||||
- liggitt
|
||||
- thockin
|
||||
title: 为 Pod 配置服务账户
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 90
|
||||
---
|
||||
|
||||
@@ -15,12 +15,12 @@ reviewers:
|
||||
- liggitt
|
||||
- thockin
|
||||
title: Configure Service Accounts for Pods
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 90
|
||||
---
|
||||
-->
|
||||
|
||||
{{% capture overview %}}
|
||||
<!-- overview -->
|
||||
|
||||
<!--
|
||||
A service account provides an identity for processes that run in a Pod.
|
||||
@@ -59,16 +59,17 @@ When they do, they are authenticated as a particular Service Account (for exampl
|
||||
当您(人类)访问集群时(例如,使用 `kubectl`),api 服务器将您的身份验证为特定的用户帐户(当前这通常是 `admin`,除非您的集群管理员已经定制了您的集群配置)。
|
||||
Pod 内的容器中的进程也可以与 api 服务器接触。
|
||||
当它们进行身份验证时,它们被验证为特定的服务帐户(例如,`default`)。
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
{{% capture prerequisites %}}
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
|
||||
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture steps %}}
|
||||
|
||||
<!-- steps -->
|
||||
|
||||
<!--
|
||||
## Use the Default Service Account to access the API server.
|
||||
@@ -448,4 +449,4 @@ Kubelet 将代表 Pod 请求和存储令牌,使令牌在可配置的文件路
|
||||
应用程序负责在令牌旋转时重新加载令牌。
|
||||
对于大多数情况,定期重新加载(例如,每 5 分钟一次)就足够了。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
---
|
||||
title: 配置 Pod 以使用卷进行存储
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 50
|
||||
---
|
||||
<!--
|
||||
---
|
||||
title: Configure a Pod to Use a Volume for Storage
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 50
|
||||
---
|
||||
-->
|
||||
|
||||
{{% capture overview %}}
|
||||
<!-- overview -->
|
||||
|
||||
此页面展示了如何配置 Pod 以使用卷进行存储。
|
||||
|
||||
@@ -27,15 +27,16 @@ consistent storage that is independent of the Container, you can use a
|
||||
applications, such as key-value stores (such as Redis) and databases.
|
||||
-->
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture prerequisites %}}
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
|
||||
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture steps %}}
|
||||
|
||||
<!-- steps -->
|
||||
|
||||
## 为 Pod 配置卷
|
||||
|
||||
@@ -178,9 +179,10 @@ of `Always`.
|
||||
kubectl delete pod redis
|
||||
```
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture whatsnext %}}
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
|
||||
* 参阅[卷](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#volume-v1-core)。
|
||||
|
||||
@@ -200,4 +202,4 @@ details such as mounting and unmounting the devices on the nodes. See
|
||||
[Volumes](/docs/concepts/storage/volumes/) for more details.
|
||||
-->
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
---
|
||||
title: 为容器分派扩展资源
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 40
|
||||
---
|
||||
|
||||
<!--
|
||||
---
|
||||
title: Assign Extended Resources to a Container
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 40
|
||||
---
|
||||
-->
|
||||
|
||||
{{% capture overview %}}
|
||||
<!-- overview -->
|
||||
|
||||
{{< feature-state state="stable" >}}
|
||||
|
||||
@@ -23,10 +23,11 @@ This page shows how to assign extended resources to a Container.
|
||||
|
||||
{{< feature-state state="stable" >}}
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
{{% capture prerequisites %}}
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
|
||||
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
|
||||
@@ -38,10 +39,10 @@ That will configure one of your Nodes to advertise a dongle resource.
|
||||
在您开始此练习前,请先练习[为节点广播扩展资源](/docs/tasks/administer-cluster/extended-resource-node/)。
|
||||
在那个练习中将配置您的一个节点来广播 dongle 资源。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
{{% capture steps %}}
|
||||
|
||||
<!-- steps -->
|
||||
|
||||
<!--
|
||||
## Assign an extended resource to a Pod
|
||||
@@ -193,9 +194,10 @@ kubectl delete pod extended-resource-demo
|
||||
kubectl delete pod extended-resource-demo-2
|
||||
```
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture whatsnext %}}
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
|
||||
<!--
|
||||
### For application developers
|
||||
@@ -217,5 +219,5 @@ kubectl delete pod extended-resource-demo-2
|
||||
|
||||
* [为节点广播扩展资源](/docs/tasks/administer-cluster/extended-resource-node/)
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
---
|
||||
title: 从私有仓库拉取镜像
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 100
|
||||
---
|
||||
|
||||
<!--
|
||||
---
|
||||
title: Pull an Image from a Private Registry
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 100
|
||||
---
|
||||
-->
|
||||
|
||||
{{% capture overview %}}
|
||||
<!-- overview -->
|
||||
|
||||
<!--
|
||||
This page shows how to create a Pod that uses a Secret to pull an image from a
|
||||
@@ -21,9 +21,10 @@ private Docker registry or repository.
|
||||
|
||||
本文介绍如何使用 Secret 从私有的 Docker 镜像仓库或代码仓库拉取镜像来创建 Pod。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture prerequisites %}}
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
|
||||
* {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
|
||||
@@ -34,9 +35,9 @@ private Docker registry or repository.
|
||||
|
||||
您需要 [Docker ID](https://docs.docker.com/docker-id/) 和密码来进行本练习。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture steps %}}
|
||||
|
||||
<!-- steps -->
|
||||
|
||||
<!--
|
||||
## Log in to Docker
|
||||
@@ -265,9 +266,10 @@ kubectl create -f my-private-reg-pod.yaml
|
||||
kubectl get pod private-reg
|
||||
```
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture whatsnext %}}
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
|
||||
<!--
|
||||
* Learn more about [Secrets](/docs/concepts/configuration/secret/).
|
||||
@@ -283,4 +285,4 @@ kubectl get pod private-reg
|
||||
* 参考 [Secret](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#secret-v1-core)。
|
||||
* 参考 [PodSpec](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podspec-v1-core) 中的 `imagePullSecrets` 字段 。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
---
|
||||
title: 配置 Pod 的服务质量
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 30
|
||||
---
|
||||
|
||||
<!--
|
||||
---
|
||||
title: Configure Quality of Service for Pods
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 30
|
||||
---
|
||||
-->
|
||||
|
||||
{{% capture overview %}}
|
||||
<!-- overview -->
|
||||
|
||||
<!--
|
||||
This page shows how to configure Pods so that they will be assigned particular
|
||||
@@ -22,17 +22,18 @@ scheduling and evicting Pods.
|
||||
|
||||
本文介绍怎样配置 Pod 让其获得特定的服务质量(QoS)类。Kubernetes 使用 QoS 类来决定 Pod 的调度和驱逐策略。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
{{% capture prerequisites %}}
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
|
||||
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
{{% capture steps %}}
|
||||
|
||||
<!-- steps -->
|
||||
|
||||
<!--
|
||||
## QoS classes
|
||||
@@ -382,9 +383,10 @@ Delete your namespace:
|
||||
kubectl delete namespace qos-example
|
||||
```
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture whatsnext %}}
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
@@ -439,5 +441,5 @@ kubectl delete namespace qos-example
|
||||
|
||||
* [控制节点上的拓扑管理策略](/docs/tasks/administer-cluster/topology-manager/)
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: 在 Pod 中的容器之间共享进程命名空间
|
||||
min-kubernetes-server-version: v1.10
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 160
|
||||
---
|
||||
<!--
|
||||
@@ -12,12 +12,12 @@ reviewers:
|
||||
- verb
|
||||
- yujuhong
|
||||
- dchen1107
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 160
|
||||
---
|
||||
-->
|
||||
|
||||
{{% capture overview %}}
|
||||
<!-- overview -->
|
||||
|
||||
{{< feature-state state="stable" for_k8s_version="v1.17" >}}
|
||||
|
||||
@@ -36,15 +36,16 @@ include debugging utilities like a shell.
|
||||
-->
|
||||
您可以使用此功能来配置协作容器,比如日志处理 sidecar 容器,或者对那些不包含诸如 shell 等调试实用工具的镜像进行故障排查。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture prerequisites %}}
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
|
||||
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture steps %}}
|
||||
|
||||
<!-- steps -->
|
||||
|
||||
<!--
|
||||
## Configure a Pod
|
||||
@@ -142,9 +143,9 @@ events {
|
||||
worker_connections 1024;
|
||||
```
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture discussion %}}
|
||||
|
||||
<!-- discussion -->
|
||||
|
||||
<!--
|
||||
## Understanding Process Namespace Sharing
|
||||
@@ -181,6 +182,6 @@ Pod 共享许多资源,因此它们共享进程命名空间是很有意义的
|
||||
|
||||
3. **容器文件系统通过 `/proc/$pid/root` 链接对 pod 中的其他容器可见。** 这使调试更加容易,但也意味着文件系统安全性只受文件系统权限的保护。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@ reviewers:
|
||||
- jsafrane
|
||||
title: 创建静态 Pod
|
||||
weight: 170
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
---
|
||||
|
||||
{{% capture overview %}}
|
||||
<!-- overview -->
|
||||
|
||||
<!--
|
||||
*Static Pods* are managed directly by the kubelet daemon on a specific node,
|
||||
@@ -45,9 +45,10 @@ kubelet 会尝试通过 Kubernetes API 服务器为每个静态 Pod 自动创建
|
||||
如果你在运行一个 Kubernetes 集群,并且在每个节点上都运行一个静态 Pod,就可能需要考虑使用 {{< glossary_tooltip text="DaemonSet" term_id="daemonset" >}} 替代这种方式。
|
||||
{{< /note >}}
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture prerequisites %}}
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
|
||||
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
|
||||
@@ -60,9 +61,9 @@ Instructions for other distributions or Kubernetes installations may vary.
|
||||
本文假定你在使用 {{< glossary_tooltip term_id="docker" >}} 来运行 Pod,并且你的节点是运行着 Fedora 操作系统。
|
||||
其它发行版或者 Kubernetes 部署版本上操作方式可能不一样。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture steps %}}
|
||||
|
||||
<!-- steps -->
|
||||
|
||||
<!--
|
||||
## Create a static pod {#static-pod-creation}
|
||||
@@ -397,4 +398,4 @@ CONTAINER ID IMAGE COMMAND CREATED ...
|
||||
e7a62e3427f1 nginx:latest "nginx -g 'daemon of 27 seconds ago
|
||||
```
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
reviewers:
|
||||
- cdrage
|
||||
title: 将 Docker Compose 文件转换为 Kubernetes 资源
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 200
|
||||
---
|
||||
|
||||
@@ -11,12 +11,12 @@ weight: 200
|
||||
reviewers:
|
||||
- cdrage
|
||||
title: Translate a Docker Compose File to Kubernetes Resources
|
||||
content_template: templates/task
|
||||
content_type: task
|
||||
weight: 170
|
||||
---
|
||||
-->
|
||||
|
||||
{{% capture overview %}}
|
||||
<!-- overview -->
|
||||
|
||||
<!--
|
||||
What's Kompose? It's a conversion tool for all things compose (namely Docker Compose) to container orchestrators (Kubernetes or OpenShift).
|
||||
@@ -30,16 +30,17 @@ More information can be found on the Kompose website at [http://kompose.io](http
|
||||
|
||||
更多信息请参考 Kompose 官网 [http://kompose.io](http://kompose.io)。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
{{% capture prerequisites %}}
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
|
||||
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture steps %}}
|
||||
|
||||
<!-- steps -->
|
||||
|
||||
<!--
|
||||
## Install Kompose
|
||||
@@ -271,9 +272,9 @@ you need is an existing `docker-compose.yml` file.
|
||||
$ curl http://192.0.2.89
|
||||
```
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture discussion %}}
|
||||
|
||||
<!-- discussion -->
|
||||
|
||||
<!--
|
||||
## User Guide
|
||||
@@ -841,4 +842,4 @@ Kompose 支持的 Docker Compose 版本包括:1、2 和 3。有限支持 2.1
|
||||
|
||||
所有三个版本的兼容性列表请查看我们的 [转换文档](https://github.com/kubernetes/kompose/blob/master/docs/conversion.md),文档中列出了所有不兼容的 Docker Compose 关键字。
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user