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
+9 -8
View File
@@ -1,18 +1,18 @@
---
title: 概念
main_menu: true
content_template: templates/concept
content_type: concept
weight: 40
---
<!-- ---
title: Concepts
main_menu: true
content_template: templates/concept
content_type: concept
weight: 40
--- -->
{{% capture overview %}}
<!-- overview -->
<!--
The Concepts section helps you learn about the parts of the Kubernetes system and the abstractions Kubernetes uses to represent your {{< glossary_tooltip text="cluster" term_id="cluster" length="all" >}}, and helps you obtain a deeper understanding of how Kubernetes works.
@@ -20,9 +20,9 @@ The Concepts section helps you learn about the parts of the Kubernetes system an
概念部分可以帮助你了解 Kubernetes 的各个组成部分以及 Kubernetes 用来表示集群的一些抽象概念,并帮助你更加深入的理解 Kubernetes 是如何工作的。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Overview
@@ -138,9 +138,10 @@ The nodes in a cluster are the machines (VMs, physical servers, etc) that run yo
集群中的 node 节点(虚拟机、物理机等等)都是用来运行你的应用和云工作流的机器。Kubernetes master 节点控制所有 node 节点;你很少需要和 node 节点进行直接通信。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
If you would like to write a concept page, see
@@ -150,4 +151,4 @@ for information about the concept page type and the concept template.
如果你想编写一个概念页面,请参阅[使用页面模板](/docs/home/contribute/page-templates/)获取更多有关概念页面类型和概念模板的信息。
{{% /capture %}}
@@ -1,19 +1,19 @@
---
title: 云控制器管理器的基础概念
content_template: templates/concept
content_type: concept
weight: 30
---
<!--
---
title: Concepts Underlying the Cloud Controller Manager
content_template: templates/concept
content_type: concept
weight: 30
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
The cloud controller manager (CCM) concept (not to be confused with the binary) was originally created to allow cloud specific vendor code and the Kubernetes core to evolve independent of one another. The cloud controller manager runs alongside other master components such as the Kubernetes controller manager, the API server, and scheduler. It can also be started as a Kubernetes addon, in which case it runs on top of Kubernetes.
@@ -45,10 +45,10 @@ Here's the architecture of a Kubernetes cluster without the cloud controller man
![没有云控制器管理器的 Kubernetes 架构](/images/docs/pre-ccm-arch.png)
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Design
@@ -496,5 +496,5 @@ Complete instructions for configuring and running the CCM are provided
[这里](/docs/tasks/administer-cluster/running-cloud-controller/#cloud-controller-manager)提供了有关配置和运行 CCM 的完整说明。
{{% /capture %}}
@@ -1,10 +1,10 @@
---
title: 控制器
content_template: templates/concept
content_type: concept
weight: 30
---
{{% capture overview %}}
<!-- overview -->
<!--
In robotics and automation, a _control loop_ is
a non-terminating loop that regulates the state of a system.
@@ -25,10 +25,10 @@ closer to the desired state, by turning equipment on or off.
{{< glossary_definition term_id="controller" length="short">}}
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Controller pattern
@@ -244,11 +244,12 @@ Deployment 控制器和 Job 控制器是 Kubernetes 内置控制器的典型例
你会发现控制平面外面运行的控制器,扩展了 Kubernetes 的能力。或者,如果你愿意,你也可以写一个新控制器。你可以以一组 Pod 来运行你的控制器,或者运行在 Kubernetes 外面。什么是最合适的控制器,这将取决于特定控制器的功能。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
* 请阅读 [Kubernetes 控制平面](/docs/concepts/#kubernetes-control-plane)
* 了解一些基本的 [Kubernetes 对象](/docs/concepts/#kubernetes-objects)
* 学习更多的 [Kubernetes API](/docs/concepts/overview/kubernetes-api/)
* 如果你想写自己的控制器,请看 Kubernetes 的[扩展模式](/docs/concepts/extend-kubernetes/extend-cluster/#extension-patterns)。
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: 节点
content_template: templates/concept
content_type: concept
weight: 10
---
<!--
@@ -9,12 +9,12 @@ reviewers:
- caesarxuchao
- dchen1107
title: Nodes
content_template: templates/concept
content_type: concept
weight: 10
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
A node is a worker machine in Kubernetes, previously known as a `minion`. A node
@@ -27,10 +27,10 @@ architecture design doc for more details.
在 Kubernetes 中,节点(Node)是执行工作的机器,以前叫做 `minion`。根据你的集群环境,节点可以是一个虚拟机或者物理机器。每个节点都包含用于运行 [pods](/docs/concepts/workloads/pods/pod/) 的必要服务,并由主控组件管理。节点上的服务包括 [容器运行时](/docs/concepts/overview/components/#node-components)、kubelet 和 kube-proxy。查阅架构设计文档中 [Kubernetes 节点](https://git.k8s.io/community/contributors/design-proposals/architecture/architecture.md#the-kubernetes-node) 一节获取更多细节。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Node Status
@@ -527,12 +527,13 @@ API object can be found at:
-->
节点是 Kubernetes REST API 的顶级资源。更多关于 API 对象的细节可以在这里找到:[节点 API 对象](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#node-v1-core)。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* Read about [node components](https://kubernetes.io/docs/concepts/overview/components/#node-components)
* Read about node-level topology: [Control Topology Management Policies on a node](/docs/tasks/administer-cluster/topology-manager/)
-->
* 了解有关[节点组件](https://kubernetes.io/docs/concepts/overview/components/#node-components)的信息。
* 阅读有关节点级拓扑的信息:[控制节点上的拓扑管理策略](/docs/tasks/administer-cluster/topology-manager/)。
{{% /capture %}}
@@ -1,10 +1,10 @@
---
title: 安装扩展(Addons
content_template: templates/concept
content_type: concept
---
{{% capture overview %}}
<!-- overview -->
<!--
@@ -21,10 +21,10 @@ Add-ons 扩展了 Kubernetes 的功能。
每个 add-ons 按字母顺序排序 - 顺序不代表任何优先地位。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Networking and Network Policy
@@ -110,4 +110,4 @@ Well-maintained ones should be linked to here. PRs welcome!
维护完善的 add-ons 应该被链接到这里。欢迎提出 PRs!
{{% /capture %}}
@@ -2,12 +2,12 @@
cn-approvers:
- lichuqiang
title: 证书
content_template: templates/concept
content_type: concept
weight: 20
---
{{% capture overview %}}
<!-- overview -->
<!--
When using client certificate authentication, you can generate certificates
@@ -17,10 +17,10 @@ manually through `easyrsa`, `openssl` or `cfssl`.
当使用客户端证书进行认证时,用户可以使用现有部署脚本,或者通过 `easyrsa``openssl`
`cfssl` 手动生成证书。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
### easyrsa
@@ -473,4 +473,4 @@ x509 certificates to use for authentication as documented
您可以按照[这里](/docs/tasks/tls/managing-tls-in-a-cluster)记录的方式,
使用 `certificates.k8s.io` API 来准备 x509 证书,用于认证。
{{% /capture %}}
@@ -1,26 +1,26 @@
---
title: 云驱动
content_template: templates/concept
content_type: concept
weight: 30
---
<!--
---
title: Cloud Providers
content_template: templates/concept
content_type: concept
weight: 30
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
This page explains how to manage Kubernetes running on a specific
cloud provider.
-->
本文介绍了如何管理运行在特定云驱动上的 Kubernetes 集群。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
### kubeadm
[kubeadm](/docs/reference/setup-tools/kubeadm/kubeadm/) is a popular option for creating kubernetes clusters.
@@ -592,7 +592,7 @@ Kubernetes network plugin and should appear in the `[Route]` section of the
[kubenet]: /docs/concepts/cluster-administration/network-plugins/#kubenet
{{% /capture %}}
## OVirt
@@ -1,10 +1,10 @@
---
title: 集群管理概述
content_template: templates/concept
content_type: concept
weight: 10
---
{{% capture overview %}}
<!-- overview -->
<!--
The cluster administration overview is for anyone creating or administering a Kubernetes cluster.
@@ -13,9 +13,9 @@ It assumes some familiarity with core Kubernetes [concepts](/docs/concepts/).
集群管理概述面向任何创建和管理 Kubernetes 集群的读者人群。
我们假设你对[用户指南](/docs/user-guide/)中的概念大概了解。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Planning a cluster
@@ -142,4 +142,4 @@ Note: Not all distros are actively maintained. Choose distros which have been te
* [记录和监控集群活动](/docs/concepts/cluster-administration/logging/)阐述了 Kubernetes 的日志如何工作以及怎样实现。
{{% /capture %}}
@@ -1,18 +1,18 @@
---
title: 控制器管理器指标
content_template: templates/concept
content_type: concept
weight: 100
---
<!--
---
title: Controller manager metrics
content_template: templates/concept
content_type: concept
weight: 100
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
Controller manager metrics provide important insight into the performance and health of
@@ -21,9 +21,9 @@ the controller manager.
控制器管理器指标为控制器管理器的性能和健康提供了重要的观测手段。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## What are controller manager metrics
@@ -79,4 +79,4 @@ to periodically gather these metrics and make them available in some kind of tim
在生产环境中,您可能想配置 prometheus 或其他一些指标收集工具,以定期收集这些指标数据,并将它们应用到某种时间序列数据库中。
{{% /capture %}}
@@ -1,13 +1,13 @@
---
title: 联邦
content_template: templates/concept
content_type: concept
---
{{% capture overview %}}
<!-- overview -->
本页面阐明了为何以及如何使用联邦创建Kubernetes集群。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
## 为何使用联邦
联邦可以使多个集群的管理简单化。它提供了两个主要构件模块:
@@ -105,13 +105,14 @@ Kubernetes集群数量选择也许是一个相对静止的选择,因为对其
最后,如果你的集群需求超过一个Kubernetes集群推荐的最大节点数,那么你可能需要更多的集群。Kubernetes1.3版本支持多达1000个节点的集群规模。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
* 进一步学习[联邦提案](https://github.com/kubernetes/community/blob/{{< param "githubbranch" >}}/contributors/design-proposals/multicluster/federation.md)。
* 集群联邦参考该[配置指导](/docs/tutorials/federation/set-up-cluster-federation-kubefed/)。
* 查看[Kubecon2016浅谈联邦](https://www.youtube.com/watch?v=pq9lbkmxpS8)
{{% /capture %}}
@@ -1,18 +1,18 @@
---
title: 配置 kubelet 垃圾回收策略
content_template: templates/concept
content_type: concept
weight: 70
---
<!--
---
title: Configuring kubelet Garbage Collection
content_template: templates/concept
content_type: concept
weight: 70
---
-->
{{% capture overview %}}
<!-- overview -->
垃圾回收是 kubelet 的一个有用功能,它将清理未使用的镜像和容器。
@@ -32,10 +32,10 @@ Kubelet will perform garbage collection for containers every minute and garbage
External garbage collection tools are not recommended as these tools can potentially break the behavior of kubelet by removing containers expected to exist.
-->
{{% /capture %}}
{{% capture body %}}
<!-- body -->
## 镜像回收
@@ -202,9 +202,10 @@ Including:
| `--outofdisk-transition-frequency` | `--eviction-pressure-transition-period` | eviction generalizes disk pressure transition to other resources |
-->
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
查阅 [配置驱逐回收资源的策略](/docs/tasks/administer-cluster/out-of-resource/) 获取更多细节。
@@ -212,4 +213,4 @@ Including:
See [Configuring Out Of Resource Handling](/docs/tasks/administer-cluster/out-of-resource/) for more details.
-->
{{% /capture %}}
@@ -3,11 +3,11 @@ reviewers:
- piosz
- x13n
title: 日志架构
content_template: templates/concept
content_type: concept
weight: 60
---
{{% capture overview %}}
<!-- overview -->
<!--
Application and systems logs can help you understand what is happening inside your cluster. The logs are particularly useful for debugging problems and monitoring cluster activity. Most modern applications have some kind of logging mechanism; as such, most container engines are likewise designed to support some kind of logging. The easiest and most embraced logging method for containerized applications is to write to the standard output and standard error streams.
@@ -19,9 +19,9 @@ However, the native functionality provided by a container engine or runtime is u
-->
但是,由容器引擎或 runtime 提供的原生功能通常不足以满足完整的日志记录方案。例如,如果发生容器崩溃、pod 被逐出或节点宕机等情况,您仍然想访问到应用日志。因此,日志应该具有独立的存储和生命周期,与节点、pod 或容器的生命周期相独立。这个概念叫 _集群级的日志_ 。集群级日志方案需要一个独立的后台来存储、分析和查询日志。Kubernetes 没有为日志数据提供原生存储方案,但是您可以集成许多现有的日志解决方案到 Kubernetes 集群中。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
Cluster-level logging architectures are described in assumption that
@@ -478,4 +478,4 @@ is outside the scope of Kubernetes.
-->
通过暴露或推送每个应用的日志,您可以实现集群级日志记录;然而,这种日志记录机制的实现已超出 Kubernetes 的范围。
{{% /capture %}}
@@ -1,20 +1,20 @@
---
title: 管理资源
content_template: templates/concept
content_type: concept
weight: 40
---
{{% capture overview %}}
<!-- overview -->
<!--
You've deployed your application and exposed it via a service. Now what? Kubernetes provides a number of tools to help you manage your application deployment, including scaling and updating. Among the features that we will discuss in more depth are [configuration files](/docs/concepts/configuration/overview/) and [labels](/docs/concepts/overview/working-with-objects/labels/).
-->
您已经部署了应用并通过服务暴露它。然后呢?Kubernetes 提供了一些工具来帮助管理您的应用部署,包括缩扩容和更新。我们将更深入讨论的特性包括[配置文件](/docs/concepts/configuration/overview/)和[标签](/docs/concepts/overview/working-with-objects/labels/)。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Organizing resource configurations
@@ -651,9 +651,10 @@ That's it! The Deployment will declaratively update the deployed nginx applicati
-->
没错,就是这样!Deployment 将在后台逐步更新已经部署的 nginx 应用。它确保在更新过程中,只有一定数量的旧副本被开闭,并且只有一定基于所需 pod 数量的新副本被创建。想要了解更多细节,请参考 [Deployment](/docs/concepts/workloads/controllers/deployment/)。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
- [Learn about how to use `kubectl` for application introspection and debugging.](/docs/tasks/debug-application-cluster/debug-application-introspection/)
@@ -662,4 +663,4 @@ That's it! The Deployment will declaratively update the deployed nginx applicati
- [学习怎么样使用 `kubectl` 观察和调试应用](/docs/tasks/debug-application-cluster/debug-application-introspection/)
- [配置最佳实践和技巧](/docs/concepts/configuration/overview/)
{{% /capture %}}
@@ -1,10 +1,10 @@
---
title: Kubernetes 控制面的指标
content_template: templates/concept
content_type: concept
weight: 60
---
{{% capture overview %}}
<!-- overview -->
<!--
System component metrics can give a better look into what is happening inside them. Metrics are particularly useful for building dashboards and alerts.
@@ -16,9 +16,9 @@ Metrics in Kubernetes control plane are emitted in [prometheus format](https://p
Kubernetes 控制面板中的指标是以 [prometheus](https://prometheus.io/docs/instrumenting/exposition_formats/) 格式发出的,而且是易于阅读的。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Metrics in Kubernetes
@@ -205,9 +205,10 @@ cloudprovider_gce_api_request_duration_seconds { request = "detach_disk"}
cloudprovider_gce_api_request_duration_seconds { request = "list_disk"}
```
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* Read about the [Prometheus text format](https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md#text-based-format) for metrics
@@ -219,4 +220,4 @@ cloudprovider_gce_api_request_duration_seconds { request = "list_disk"}
* 查看 [Kubernetes 稳定版指标](https://github.com/kubernetes/kubernetes/blob/master/test/instrumentation/testdata/stable-metrics-list.yaml)列表
* 了解有关 [Kubernetes 指标弃用策略](https://kubernetes.io/docs/reference/using-api/deprecation-policy/#deprecating-a-feature-or-behavior )
{{% /capture %}}
@@ -2,11 +2,11 @@
reviewers:
- thockin
title: 集群网络系统
content_template: templates/concept
content_type: concept
weight: 50
---
{{% capture overview %}}
<!-- overview -->
<!--
Networking is a central part of Kubernetes, but it can be challenging to
understand exactly how it is expected to work. There are 4 distinct networking
@@ -25,10 +25,10 @@ problems to address:
3. Pod 和 Service 间通信:这个已经在 [services](/docs/concepts/services-networking/service/) 里讲述过了。
4. 外部和 Service 间通信:这个也已经在 [services](/docs/concepts/services-networking/service/) 讲述过了。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
Kubernetes is all about sharing machines between applications. Typically,
@@ -555,9 +555,10 @@ to run, and in both cases, the network provides one IP address per pod - as is s
[Weave Net](https://www.weave.works/products/weave-net/) 是 Kubernetes 及其托管应用程序的弹性和易于使用的网络系统。Weave Net 可以作为 [CNI plug-in](https://www.weave.works/docs/net/latest/cni-plugin/) 运行或者独立运行。在这两种运行方式里,都不需要任何配置或额外的代码即可运行,并且在两种情况下,网络都为每个 Pod 提供一个 IP 地址-这是 Kubernetes 的标准配置。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
The early design of the networking model and its rationale, and some future
@@ -567,4 +568,4 @@ document](https://git.k8s.io/community/contributors/design-proposals/network/net
网络模型的早期设计、运行原理以及未来的一些计划,都在 [networking design
document](https://git.k8s.io/community/contributors/design-proposals/network/networking.md) 文档里进行了更详细的描述。
{{% /capture %}}
@@ -1,13 +1,13 @@
---
title: Kubernetes 中的代理
content_template: templates/concept
content_type: concept
---
{{% capture overview %}}
<!-- overview -->
本文讲述了 Kubernetes 中所使用的代理。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
## 代理
@@ -59,4 +59,4 @@ Kubernetes 用户通常只需要关心前两种类型的代理,集群管理员
代理已经取代重定向功能,重定向已被弃用。
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: 将 Pod 分配给节点
content_template: templates/concept
content_type: concept
weight: 50
---
@@ -11,13 +11,13 @@ reviewers:
- kevin-wangzefeng
- bsalamat
title: Assigning Pods to Nodes
content_template: templates/concept
content_type: concept
weight: 50
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
You can constrain a {{< glossary_tooltip text="Pod" term_id="pod" >}} to only be able to run on particular
@@ -33,9 +33,9 @@ services that communicate a lot into the same availability zone.
你可以约束一个 {{< glossary_tooltip text="Pod" term_id="pod" >}} 只能在特定的 {{< glossary_tooltip text="Node(s)" term_id="node" >}} 上运行,或者优先运行在特定的节点上。有几种方法可以实现这点,推荐的方法都是用[标签选择器](/docs/concepts/overview/working-with-objects/labels/)来进行选择。通常这样的约束不是必须的,因为调度器将自动进行合理的放置(比如,将 pod 分散到节点上,而不是将 pod 放置在可用资源不足的节点上等等),但在某些情况下,你可以需要更多控制 pod 停靠的节点,例如,确保 pod 最终落在连接了 SSD 的机器上,或者将来自两个不同的服务且有大量通信的 pod 放置在同一个可用区。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
## nodeSelector
@@ -664,9 +664,10 @@ The above pod will run on the node kube-01.
上面的 pod 将运行在 kube-01 节点上。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
[Taints](/docs/concepts/configuration/taint-and-toleration/) allow a Node to *repel* a set of Pods.
@@ -690,4 +691,4 @@ resource allocation decisions.
一旦 pod 分配给 节点,kubelet 应用将运行该 pod 并且分配节点本地资源。[拓扑管理](/docs/tasks/administer-cluster/topology-manager/)
{{% /capture %}}
@@ -1,10 +1,10 @@
---
title: ConfigMap
content_template: templates/concept
content_type: concept
weight: 20
---
{{% capture overview %}}
<!-- overview -->
{{< glossary_definition term_id="configmap" prepend="ConfigMap 是" length="all" >}}
@@ -18,9 +18,9 @@ or use additional (third party) tools to keep your data private.
ConfigMap 并不提供保密或者加密功能。如果你想存储的数据是机密的,请使用 {{< glossary_tooltip text="Secret" term_id="secret" >}} ,或者使用其他第三方工具来保证你的数据的私密性,而不是用 ConfigMap。
{{< /caution >}}
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Motivation
@@ -213,8 +213,9 @@ ConfigMap 最常见的用法是为同一命名空间里某 Pod 中运行的容
{{< /note >}}
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* Read about [Secrets](/docs/concepts/configuration/secret/).
@@ -226,4 +227,4 @@ ConfigMap 最常见的用法是为同一命名空间里某 Pod 中运行的容
* 阅读 [配置 Pod 来使用 ConfigMap](/docs/tasks/configure-pod-container/configure-pod-configmap/)。
* 阅读 [Twelve-Factor 应用](https://12factor.net/) 来了解将代码和配置分开的动机。
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: 为容器管理计算资源
content_template: templates/concept
content_type: concept
weight: 20
feature:
title: 自动装箱
@@ -11,7 +11,7 @@ feature:
<!--
---
title: Managing Compute Resources for Containers
content_template: templates/concept
content_type: concept
weight: 20
feature:
title: Automatic binpacking
@@ -20,7 +20,7 @@ feature:
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
When you specify a [Pod](/docs/concepts/workloads/pods/pod/), you can optionally specify how
@@ -33,10 +33,10 @@ the difference between requests and limits, see
-->
当您定义 [Pod](/docs/user-guide/pods) 的时候可以选择为每个容器指定需要的 CPU 和内存(RAM)大小。当为容器指定了资源请求后,调度器就能够更好的判断出将容器调度到哪个节点上。如果您还为容器指定了资源限制,Kubernetes 就可以按照指定的方式来处理节点上的资源竞争。关于资源请求和限制的不同点和更多资料请参考 [Resource QoS](https://git.k8s.io/community/contributors/design-proposals/resource-qos.md)。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Resource types
@@ -945,10 +945,11 @@ spec:
example.com/foo: 1
```
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* Get hands-on experience [assigning Memory resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-memory-resource/).
@@ -968,4 +969,4 @@ spec:
* [资源需求](/docs/resources-reference/{{< param "version" >}}/#resourcerequirements-v1-core)
{{% /capture %}}
@@ -1,17 +1,17 @@
---
title: 使用 kubeconfig 文件组织集群访问
content_template: templates/concept
content_type: concept
weight: 60
---
<!--
---
title: Organizing Cluster Access Using kubeconfig Files
content_template: templates/concept
content_type: concept
weight: 60
---
--->
{{% capture overview %}}
<!-- overview -->
<!--
Use kubeconfig files to organize information about clusters, users, namespaces, and
@@ -46,10 +46,10 @@ For step-by-step instructions on creating and specifying kubeconfig files, see
--->
有关创建和指定 kubeconfig 文件的分步说明,请参阅[配置对多集群的访问](/docs/tasks/access-application-cluster/configure-access-multiple-clusters)。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Supporting multiple clusters, users, and authentication mechanisms
@@ -264,10 +264,11 @@ are stored absolutely.
--->
kubeconfig 文件中的文件和路径引用是相对于 kubeconfig 文件的位置。命令行上的文件引用是相当对于当前工作目录的。在 `$HOME/.kube/config` 中,相对路径按相对路径存储,绝对路径按绝对路径存储。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* [Configure Access to Multiple Clusters](/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)
@@ -275,6 +276,6 @@ kubeconfig 文件中的文件和路径引用是相对于 kubeconfig 文件的位
--->
* [配置对多集群的访问](/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)
* [`kubectl config`](/docs/reference/generated/kubectl/kubectl-commands#config)
{{% /capture %}}
@@ -2,7 +2,7 @@
reviewers:
- mikedanese
title: 配置最佳实践
content_template: templates/concept
content_type: concept
weight: 10
---
<!--
@@ -10,12 +10,12 @@ weight: 10
reviewers:
- mikedanese
title: Configuration Best Practices
content_template: templates/concept
content_type: concept
weight: 10
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
This document highlights and consolidates configuration best practices that are introduced throughout the user guide, Getting Started documentation, and examples.
-->
@@ -26,9 +26,9 @@ This is a living document. If you think of something that is not on this list bu
-->
这是一份活文件。
如果您认为某些内容不在此列表中但可能对其他人有用,请不要犹豫,提交问题或提交 PR。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## General Configuration Tips
-->
@@ -264,4 +264,4 @@ The caching semantics of the underlying image provider make even `imagePullPolic
- 使用`kubectl run``kubectl expose`来快速创建单容器部署和服务。
有关示例,请参阅[使用服务访问集群中的应用程序](/docs/tasks/access-application-cluster/service-access-application-cluster/)。
{{% /capture %}}
@@ -1,10 +1,10 @@
---
title: Pod 开销
content_template: templates/concept
content_type: concept
weight: 20
---
{{% capture overview %}}
<!-- overview -->
{{< feature-state for_k8s_version="v1.18" state="beta" >}}
@@ -18,10 +18,10 @@ on top of the container requests & limits.
在节点上运行 Pod 时,Pod 本身占用大量系统资源。这些资源是运行 Pod 内容器所需资源的附加资源。
_POD 开销_ 是一个特性,用于计算 Pod 基础设施在容器请求和限制之上消耗的资源。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Pod Overhead
@@ -298,11 +298,12 @@ from source in the meantime.
在 [kube-state-metrics](https://github.com/kubernetes/kube-state-metrics) 中可以通过 `kube_pod_overhead` 指标来协助确定何时使用 PodOverhead 以及协助观察以一个既定开销运行的工作负载的稳定性。
该特性在 kube-state-metrics 的 1.9 发行版本中不可用,不过预计将在后续版本中发布。在此之前,用户需要从源代码构建 kube-state-metrics.
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
* [RuntimeClass](/docs/concepts/containers/runtime-class/)
* [PodOverhead 设计](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/20190226-pod-overhead.md)
{{% /capture %}}
@@ -4,7 +4,7 @@ reviewers:
- k82cn
- ahg-g
title: 扩展资源的资源箱打包
content_template: templates/concept
content_type: concept
weight: 10
---
<!--
@@ -14,12 +14,12 @@ reviewers:
- k82cn
- ahg-g
title: Resource Bin Packing for Extended Resources
content_template: templates/concept
content_type: concept
weight: 10
---
-->
{{% capture overview %}}
<!-- overview -->
{{< feature-state for_k8s_version="1.16" state="alpha" >}}
@@ -29,9 +29,9 @@ The kube-scheduler can be configured to enable bin packing of resources along wi
可以将 kube-scheduler 配置为使用 `RequestedToCapacityRatioResourceAllocation` 优先级函数启用资源箱打包以及扩展资源。
优先级函数可用于根据自定义需求微调 kube-scheduler 。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Enabling Bin Packing using RequestedToCapacityRatioResourceAllocation
@@ -254,5 +254,5 @@ NodeScore = (5 * 5) + (7 * 1) + (10 * 3) / (5 + 1 + 3)
```
{{% /capture %}}
@@ -1,11 +1,11 @@
---
title: Secret
content_template: templates/concept
content_type: concept
weight: 50
---
{{% capture overview %}}
<!-- overview -->
<!--
Kubernetes `secret` objects let you store and manage sensitive information, such
@@ -18,9 +18,9 @@ is safer and more flexible than putting it verbatim in a
将这些信息放在 `secret` 中比放在 {{< glossary_tooltip term_id="pod" >}} 的定义或者 {{< glossary_tooltip text="容器镜像" term_id="image" >}} 中来说更加安全和灵活。
参阅 [Secret 设计文档](https://git.k8s.io/community/contributors/design-proposals/auth/secrets.md) 获取更多详细信息。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Overview of Secrets
@@ -1561,6 +1561,7 @@ for secret data, so that the secrets are not stored in the clear into {{< glossa
- 可以创建和使用 secret 的 pod 的用户也可以看到该 secret 的值。即使 API server 策略不允许用户读取 secret 对象,用户也可以运行暴露 secret 的 pod。
- 目前,任何节点的 root 用户都可以通过模拟 kubelet 来读取 API server 中的任何 secret。只有向实际需要它们的节点发送 secret 才能限制单个节点的根漏洞的影响,该功能还在计划中。
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
{{% /capture %}}
@@ -1,11 +1,11 @@
---
title: Taint 和 Toleration
content_template: templates/concept
content_type: concept
weight: 40
---
{{% capture overview %}}
<!-- overview -->
<!--
Node affinity, described [here](/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature),
is a property of *pods* that *attracts* them to a set of nodes (either as a
@@ -23,9 +23,9 @@ onto nodes with matching taints.
-->
Taint 和 toleration 相互配合,可以用来避免 pod 被分配到不合适的节点上。每个节点上都可以应用一个或多个 taint ,这表示对于那些不能容忍这些 taint 的 pod,是不会被该节点接受的。如果将 toleration 应用于 pod 上,则表示这些 pod 可以(但不要求)被调度到具有匹配 taint 的节点上。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
@@ -3,18 +3,18 @@ approvers:
- mikedanese
- thockin
title: 容器环境变量
content_template: templates/concept
content_type: concept
---
{{% capture overview %}}
<!-- overview -->
本文介绍容器环境中对容器可用的资源。
{{% /capture %}}
{{< toc >}}
{{% capture body %}}
<!-- body -->
## 容器环境
@@ -50,13 +50,14 @@ FOO_SERVICE_PORT=<服务所启用的端口>
服务具有专用 IP 地址,如果启用了 [DNS 插件](http://releases.k8s.io/{{< param "githubbranch" >}}/cluster/addons/dns/),还可以在容器中通过 DNS 进行访问。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
* 查看[容器生命周期挂钩(hooks](/docs/concepts/containers/container-lifecycle-hooks/)了解更多。
* 获取[为容器生命周期事件附加处理程序](/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/)的实践经验。
{{% /capture %}}
@@ -1,20 +1,20 @@
---
title: 容器环境
content_template: templates/concept
content_type: concept
weight: 20
---
{{% capture overview %}}
<!-- overview -->
<!--
This page describes the resources available to Containers in the Container environment.
-->
本页描述了在容器环境里容器可用的资源。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Container environment
@@ -81,9 +81,10 @@ if [DNS addon](http://releases.k8s.io/{{< param "githubbranch" >}}/cluster/addon
-->
Service 具有专用的 IP 地址。如果启用了 [DNS插件](http://releases.k8s.io/{{< param "githubbranch" >}}/cluster/addons/dns/),就可以在容器中通过 DNS 来访问。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* Learn more about [Container lifecycle hooks](/docs/concepts/containers/container-lifecycle-hooks/).
@@ -93,4 +94,4 @@ Service 具有专用的 IP 地址。如果启用了 [DNS插件](http://releases.
* 学习更多有关[容器生命周期钩子](/docs/concepts/containers/container-lifecycle-hooks/)的知识。
* 动手获得经验[将处理程序附加到容器生命周期事件](/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/)。
{{% /capture %}}
@@ -3,7 +3,7 @@ reviewers:
- mikedanese
- thockin
title: 容器生命周期钩子
content_template: templates/concept
content_type: concept
weight: 30
---
@@ -12,12 +12,12 @@ reviewers:
- mikedanese
- thockin
title: Container Lifecycle Hooks
content_template: templates/concept
content_type: concept
weight: 30
-->
{{% capture overview %}}
<!-- overview -->
<!--
This page describes how kubelet managed Containers can use the Container lifecycle hook framework
@@ -25,10 +25,10 @@ to run code triggered by events during their management lifecycle.
-->
这个页面描述了 kubelet 管理的容器如何使用容器生命周期钩子框架来运行在其管理生命周期中由事件触发的代码。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Overview
@@ -214,9 +214,10 @@ Events:
1m 22s 2 {kubelet gke-test-cluster-default-pool-a07e5d30-siqd} spec.containers{main} Warning FailedPostStartHook
```
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* Learn more about the [Container environment](/docs/concepts/containers/container-environment-variables/).
@@ -227,4 +228,4 @@ Events:
* 了解更多关于[容器环境](/docs/concepts/containers/container-environment-variables/)。
* 获取实践经验[将处理程序附加到容器生命周期事件](/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/)。
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: 镜像
content_template: templates/concept
content_type: concept
weight: 10
---
<!--
@@ -9,12 +9,12 @@ reviewers:
- erictune
- thockin
title: Images
content_template: templates/concept
content_type: concept
weight: 10
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
You create your Docker image and push it to a registry before referring to it in a Kubernetes pod.
@@ -25,10 +25,10 @@ The `image` property of a container supports the same syntax as the `docker` com
容器的 `image` 属性支持与 `docker` 命令相同的语法,包括私有仓库和标签。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Updating Images
@@ -663,7 +663,7 @@ common use cases and suggested solutions.
- 为每个租户获取仓库凭证,放置在 secret 中,并发布到每个租户的命名空间下。
- 租户将 secret 增加到每个命名空间下的 imagePullSecrets 中。
{{% /capture %}}
<!--
If you need access to multiple registries, you can create one secret for each registry.
@@ -1,10 +1,10 @@
---
title: 容器概述
content_template: templates/concept
content_type: concept
weight: 1
---
{{% capture overview %}}
<!-- overview -->
<!--
Containers are a technnology for packaging the (compiled) code for an
@@ -20,10 +20,10 @@ This makes deployment easier in different cloud or OS environments.
容器将应用程序和底层主机架构解耦,这使得在不同的云或OS环境中部署应用更加容易。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Container images
@@ -50,12 +50,13 @@ the change, then recreate the container to start from the updated image.
{{< glossary_definition term_id="container-runtime" length="all" >}}
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* Read about [container images](/docs/concepts/containers/images/)
* Read about [Pods](/docs/concepts/workloads/pods/)
-->
* 阅读有关[容器镜像](/docs/concepts/containers/images/)
* 阅读有关 [Pods](/docs/concepts/workloads/pods/)
{{% /capture %}}
@@ -3,11 +3,11 @@ reviewers:
- tallclair
- dchen1107
title: 容器运行时类(Runtime Class)
content_template: templates/concept
content_type: concept
weight: 20
---
{{% capture overview %}}
<!-- overview -->
{{< feature-state for_k8s_version="v1.14" state="beta" >}}
@@ -22,10 +22,10 @@ configuration is used to run a Pod's containers.
-->
RuntimeClass 是一个用于选择容器运行时配置的特性,容器运行时配置用于运行 Pod 中的容器。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Motivation
@@ -307,8 +307,9 @@ are accounted for in Kubernetes.
-->
Pod 开销通过 RuntimeClass 的 `overhead` 字段定义。通过使用这些字段,你可以指定使用该 RuntimeClass 运行 Pod 时的开销并确保 Kubernetes 将这些开销计算在内。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
- [RuntimeClass Design](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/runtime-class.md)
@@ -321,4 +322,4 @@ Pod 开销通过 RuntimeClass 的 `overhead` 字段定义。通过使用这些
- 阅读关于 [Pod 开销](/docs/concepts/configuration/pod-overhead/) 的概念
- [PodOverhead 特性设计](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/20190226-pod-overhead.md)
{{% /capture %}}
@@ -1,18 +1,18 @@
---
title: 概念模板示例
content_template: templates/concept
content_type: concept
toc_hide: true
---
<!--
---
title: Example Concept Template
content_template: templates/concept
content_type: concept
toc_hide: true
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
Be sure to also [create an entry in the table of contents](/docs/home/contribute/write-new-topic/#creating-an-entry-in-the-table-of-contents) for your new document.
@@ -28,9 +28,9 @@ This page explains ...
本页解释了 ...
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Understanding ...
@@ -52,9 +52,10 @@ To use ...
-->
使用 ...
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
@@ -70,6 +71,6 @@ To use ...
* 了解有关[撰写新主题](/docs/home/contribute/write-new-topic/)的更多信息。
* 有关如何使用此模板的信息,请参阅[使用页面模板 - 概念模板](/docs/home/contribute/page-templates/#concept_template)。
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: 通过聚合层扩展 Kubernetes API
content_template: templates/concept
content_type: concept
weight: 10
---
<!--
@@ -10,21 +10,21 @@ reviewers:
- lavalamp
- cheftako
- chenopis
content_template: templates/concept
content_type: concept
weight: 10
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
The aggregation layer allows Kubernetes to be extended with additional APIs, beyond what is offered by the core Kubernetes APIs.
-->
聚合层允许 Kubernetes 通过额外的 API 进行扩展,而不局限于 Kubernetes 核心 API 提供的功能。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Overview
@@ -57,9 +57,10 @@ extension-apiserver 与 kube-apiserver 之间的连接应具有低延迟。
特别是,发现请求需要在五秒钟或更短的时间内从 kube-apiserver 往返。
如果您的部署无法实现此目的,则应考虑如何进行更改。目前,在 kube-apiserver 上设置 `EnableAggregatedDiscoveryTimeout=false` 功能开关将禁用超时限制。它将在将来的版本中被删除。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* To get the aggregator working in your environment, [configure the aggregation layer](/docs/tasks/access-kubernetes-api/configure-aggregation-layer/).
@@ -70,6 +71,6 @@ extension-apiserver 与 kube-apiserver 之间的连接应具有低延迟。
* 然后[安装扩展的 api-server](/docs/tasks/access-kubernetes-api/setup-extension-api-server/) 来开始使用聚合层。
* 也可以学习怎样 [使用自定义资源定义扩展 Kubernetes API](/docs/tasks/access-kubernetes-api/extend-api-custom-resource-definitions/)。
{{% /capture %}}
@@ -1,11 +1,11 @@
---
title: 设备插件
description: 使用 Kubernetes 设备插件框架来实现适用于 GPU、NIC、FPGA、InfiniBand 以及类似的需要特定于供应商设置的资源的插件。
content_template: templates/concept
content_type: concept
weight: 20
---
{{% capture overview %}}
<!-- overview -->
{{< feature-state for_k8s_version="v1.10" state="beta" >}}
<!--
@@ -23,9 +23,9 @@ Kubernetes 提供了一个[设备插件框架](https://github.com/kubernetes/com
供应商可以实现设备插件,由您手动部署或作为 {{< glossary_tooltip term_id="daemonset" >}} 来部署,而不必定制 Kubernetes 本身的代码。目标设备包括 GPU、高性能 NIC、FPGA、InfiniBand 适配器以及其他类似的、可能需要特定于供应商的初始化和设置的计算资源。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
## 注册设备插件
@@ -339,8 +339,9 @@ Here are some examples of device plugin implementations:
* [SR-IOV Network device plugin](https://github.com/intel/sriov-network-device-plugin)
* [Xilinx FPGA device plugins](https://github.com/Xilinx/FPGA_as_a_Service/tree/master/k8s-fpga-device-plugin/trunk)
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* Learn about [scheduling GPU resources](/docs/tasks/manage-gpus/scheduling-gpus/) using device plugins
@@ -353,4 +354,4 @@ Here are some examples of device plugin implementations:
* 阅读如何在 Kubernetes 中如何使用 [TLS 入口的硬件加速](https://kubernetes.io/blog/2019/04/24/hardware-accelerated-ssl/tls-termination-in-ingress-controllers-using-kubernetes-device-plugins-and-runtimeclass/)
* 学习 [Topology Manager] (/docs/tasks/adminster-cluster/topology-manager/)
{{% /capture %}}
@@ -1,16 +1,16 @@
---
title: 网络插件
content_template: templates/concept
content_type: concept
weight: 10
---
<!--
title: Network Plugins
content_template: templates/concept
content_type: concept
weight: 10
-->
{{% capture overview %}}
<!-- overview -->
{{< feature-state state="alpha" >}}
<!--
@@ -29,9 +29,9 @@ Kubernetes中的网络插件有几种类型:
* CNI 插件: 遵守 appc/CNI 规约,为互操作性设计。
* Kubenet 插件:使用 `bridge``host-local` CNI 插件实现了基本的 `cbr0`
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Installation
@@ -266,8 +266,9 @@ This option is provided to the network-plugin; currently **only kubenet supports
* `--network-plugin=kubenet` 用来表明我们要使用 `kubenet` 网络插件,CNI `bridge``host-local` 插件位于 `/opt/cni/bin``cni-bin-dir` 中。
* `--network-plugin-mtu=9001` 指定了我们使用的 MTU,当前仅被 `kubenet` 网络插件使用。
{{% /capture %}}
{{% capture whatsnext %}}
{{% /capture %}}
## {{% heading "whatsnext" %}}
@@ -1,6 +1,6 @@
---
title: 扩展 Kubernetes 集群
content_template: templates/concept
content_type: concept
weight: 10
---
<!--
@@ -11,12 +11,12 @@ reviewers:
- lavalamp
- cheftako
- chenopis
content_template: templates/concept
content_type: concept
weight: 10
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
Kubernetes is highly configurable and extensible. As a result,
@@ -34,10 +34,10 @@ Kubernetes 是高度可配置和可扩展的。因此,极少需要分发或提
本文档介绍自定义 Kubernetes 集群的选项。本文档的目标读者 {{< glossary_tooltip text="cluster operators" term_id="cluster-operator" >}} 是希望了解如何使 Kubernetes 集群满足其业务环境需求的集群运维人员。Kubernetes 项目的贡献者 {{< glossary_tooltip text="Contributors" term_id="contributor" >}} 或潜在的平台开发人员 {{< glossary_tooltip text="Platform Developers" term_id="platform-developer" >}} 也可以从本文找到有用的信息,如对已存在扩展点和模式的介绍,以及它们的权衡和限制。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Overview
@@ -343,10 +343,11 @@ the nodes chosen for a pod.
调度器也支持 [webhook](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/scheduling/scheduler_extender.md),它允许一个 webhook 后端(调度器扩展程序)为 pod 筛选节点和确定节点的优先级。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* Learn more about [Custom Resources](/docs/concepts/api-extension/custom-resources/)
@@ -365,4 +366,4 @@ the nodes chosen for a pod.
* 了解 [kubectl 插件](/docs/tasks/extend-kubectl/kubectl-plugins/)
* 了解[操作者模式](/docs/concepts/extend-kubernetes/operator/)
{{% /capture %}}
@@ -1,18 +1,18 @@
---
title: Operator 模式
content_template: templates/concept
content_type: concept
weight: 30
---
<!--
---
title: Operator pattern
content_template: templates/concept
content_type: concept
weight: 30
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
Operators are software extensions to Kubernetes that make use of [custom
@@ -24,9 +24,9 @@ Kubernetes principles, notably the [control loop](/docs/concepts/#kubernetes-con
Operator 是 Kubernetes 的扩展软件,它利用[自定义资源](/docs/concepts/extend-kubernetes/api-extension/custom-resources/)管理应用及其组件。
Operator 遵循 Kubernetes 的理念,特别是在[控制回路](/docs/concepts/#kubernetes-control-plane)方面。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Motivation
@@ -200,9 +200,10 @@ that can act as a [client for the Kubernetes API](/docs/reference/using-api/clie
您还可以使用任何支持 [Kubernetes API 客户端](/docs/reference/using-api/client-libraries/)的语言或运行时来实现 Operator(即控制器)。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* Learn more about [Custom Resources](/docs/concepts/extend-kubernetes/api-extension/custom-resources/)
@@ -229,4 +230,4 @@ that can act as a [client for the Kubernetes API](/docs/reference/using-api/clie
* 阅读 [CoreOS 原文](https://coreos.com/blog/introducing-operators.html),其介绍了 Operator 介绍
* 阅读这篇来自谷歌云的关于构建 Operator 最佳实践的[文章](https://cloud.google.com/blog/products/containers-kubernetes/best-practices-for-building-kubernetes-operators-and-stateful-apps)
{{% /capture %}}
@@ -2,7 +2,7 @@
title: 服务目录
reviewers:
- chenopis
content_template: templates/concept
content_type: concept
weight: 40
---
<!--
@@ -10,12 +10,12 @@ weight: 40
title: Service Catalog
reviewers:
- chenopis
content_template: templates/concept
content_type: concept
weight: 40
---
-->
{{% capture overview %}}
<!-- overview -->
{{< glossary_definition term_id="service-catalog" length="all" prepend="" >}}
<!--
@@ -29,10 +29,10 @@ Using Service Catalog, a {{< glossary_tooltip text="cluster operator" term_id="c
使用服务目录,集群操作者可以浏览其提供的托管服务列表,提供托管服务实例并与之绑定,以使其可以被 Kubernetes 集群中的应用程序使用。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Example use case
@@ -437,10 +437,11 @@ The following example describes how to map secret values into application enviro
key: topic
```
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* If you are familiar with {{< glossary_tooltip text="Helm Charts" term_id="helm-chart" >}}, [install Service Catalog using Helm](/docs/tasks/service-catalog/install-service-catalog-using-helm/) into your Kubernetes cluster. Alternatively, you can [install Service Catalog using the SC tool](/docs/tasks/service-catalog/install-service-catalog-using-sc/).
* View [sample service brokers](https://github.com/openservicebrokerapi/servicebroker/blob/master/gettingStarted.md#sample-service-brokers).
@@ -451,7 +452,7 @@ The following example describes how to map secret values into application enviro
* 查看[服务代理示例](https://github.com/openservicebrokerapi/servicebroker/blob/master/gettingStarted.md#sample-service-brokers)。
* 浏览 [kubernetes-incubator/service-catalog](https://github.com/kubernetes-incubator/service-catalog) 项目。
* 查看 [svc-cat.io](https://svc-cat.io/docs/)。
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: Kubernetes 组件
content_template: templates/concept
content_type: concept
weight: 20
card:
name: concepts
@@ -11,7 +11,7 @@ card:
reviewers:
- lavalamp
title: Kubernetes Components
content_template: templates/concept
content_type: concept
weight: 20
card:
name: concepts
@@ -30,7 +30,7 @@ Here's the diagram of a Kubernetes cluster with all the components tied together
![Components of Kubernetes](/images/docs/components-of-kubernetes.png)
-->
{{% capture overview %}}
<!-- overview -->
当你部署完 Kubernetes, 即拥有了一个完整的集群。
{{< glossary_definition term_id="cluster" length="all" prepend="一个 Kubernetes 集群包含">}}
@@ -40,9 +40,9 @@ Here's the diagram of a Kubernetes cluster with all the components tied together
![Components of Kubernetes](/images/docs/components-of-kubernetes.png)
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Control Plane Components
-->
@@ -222,8 +222,9 @@ saving container logs to a central log store with search/browsing interface.
-->
[集群层面日志](/docs/concepts/cluster-administration/logging/) 机制负责将容器的日志数据保存到一个集中的日志存储中,该存储能够提供搜索和浏览接口。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* Learn about [Nodes](/docs/concepts/architecture/nodes/)
* Learn about [kube-scheduler](/docs/concepts/scheduling/kube-scheduler/)
@@ -232,4 +233,4 @@ saving container logs to a central log store with search/browsing interface.
* 进一步了解 [Nodes](/docs/concepts/architecture/nodes/)
* 进一步了解 [kube-scheduler](/docs/concepts/scheduling/kube-scheduler/)
* 阅读 etcd 官方[文档](https://etcd.io/docs/)
{{% /capture %}}
@@ -1,13 +1,13 @@
---
title: Kubernetes API
content_template: templates/concept
content_type: concept
weight: 30
card:
name: concepts
weight: 30
---
{{% capture overview %}}
<!-- overview -->
<!--
Overall API conventions are described in the [API conventions doc](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md).
@@ -34,10 +34,10 @@ Kubernetes 通过API资源存储自己序列化状态(现在存储在[etcd](http
Kubernetes 被分成多个组件,各部分通过API相互交互。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## API changes
@@ -271,4 +271,4 @@ Individual resource enablement/disablement is only supported in the `extensions/
{{< /note >}}
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: Kubernetes 是什么?
content_template: templates/concept
content_type: concept
weight: 10
card:
name: concepts
@@ -12,7 +12,7 @@ reviewers:
- bgrant0607
- mikedanese
title: What is Kubernetes
content_template: templates/concept
content_type: concept
weight: 10
card:
name: concepts
@@ -20,14 +20,14 @@ card:
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
This page is an overview of Kubernetes.
-->
此页面是 Kubernetes 的概述。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. It has a large, rapidly growing ecosystem. Kubernetes services, support, and tools are widely available.
-->
@@ -205,13 +205,14 @@ Kubernetes
* Kubernetes 不提供也不采用任何全面的机器配置、维护、管理或自我修复系统。
* 此外,Kubernetes 不仅仅是一个编排系统,实际上它消除了编排的需要。编排的技术定义是执行已定义的工作流程:首先执行 A,然后执行 B,再执行 C。相比之下,Kubernetes 包含一组独立的、可组合的控制过程,这些过程连续地将当前状态驱动到所提供的所需状态。从 A 到 C 的方式无关紧要,也不需要集中控制,这使得系统更易于使用且功能更强大、健壮、弹性和可扩展性。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* Take a look at the [Kubernetes Components](/docs/concepts/overview/components/)
* Ready to [Get Started](/docs/setup/)?
-->
* 查阅 [Kubernetes 组件](/docs/concepts/overview/components/)
* 开始 [Kubernetes 入门](/docs/setup/)?
{{% /capture %}}
@@ -1,27 +1,27 @@
---
title: 注解
content_template: templates/concept
content_type: concept
weight: 50
---
<!--
---
title: Annotations
content_template: templates/concept
content_type: concept
weight: 50
---
-->
{{% capture overview %}}
<!-- overview -->
你可以使用 Kubernetes 注解为对象附加任意的非标识的元数据。客户端程序(例如工具和库)能够获取这些元数据信息。
<!--
You can use Kubernetes annotations to attach arbitrary non-identifying metadata
to objects. Clients such as tools and libraries can retrieve this metadata.
-->
{{% /capture %}}
{{% capture body %}}
<!-- body -->
## 为对象附加元数据
<!--
## Attaching metadata to objects
@@ -163,11 +163,12 @@ spec:
```
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
进一步了解[标签和选择器](/docs/concepts/overview/working-with-objects/labels/)。
<!--
Learn more about [Labels and Selectors](/docs/concepts/overview/working-with-objects/labels/).
-->
{{% /capture %}}
@@ -1,15 +1,15 @@
---
title: 推荐使用的标签
content_template: templates/concept
content_type: concept
---
<!--
---
title: Recommended Labels
content_template: templates/concept
content_type: concept
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
You can visualize and manage Kubernetes objects with more tools than kubectl and
the dashboard. A common set of labels allows tools to work interoperably, describing
@@ -23,9 +23,9 @@ in a way that can be queried.
-->
除了支持工具外,推荐的标签还以一种可以查询的方式描述了应用程序。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
The metadata is organized around the concept of an _application_. Kubernetes is not
a platform as a service (PaaS) and doesn't have or enforce a formal notion of an application.
@@ -254,4 +254,4 @@ With the MySQL `StatefulSet` and `Service` you'll notice information about both
-->
使用 MySQL `StatefulSet``Service`,您会注意到有关 MySQL 和 Wordpress 的信息,包括更广泛的应用程序。
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: 理解 Kubernetes 对象
content_template: templates/concept
content_type: concept
weight: 10
card:
name: 概念
@@ -9,21 +9,21 @@ card:
<!---
title: Understanding Kubernetes Objects
content_template: templates/concept
content_type: concept
weight: 10
card:
name: concepts
weight: 40
-->
{{% capture overview %}}
<!-- overview -->
<!--
This page explains how Kubernetes objects are represented in the Kubernetes API, and how you can express them in `.yaml` format.
-->
本页说明了 Kubernetes 对象在 Kubernetes API 中是如何表示的,以及如何在 `.yaml` 格式的文件中表示。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Understanding Kubernetes Objects
@@ -155,9 +155,10 @@ and the `spec` format for a `Deployment` can be found
并且可以从
[这里](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#deploymentspec-v1-apps)
查看 `Deployment``spec` 格式。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* [Kubernetes API overview](/docs/reference/using-api/api-overview/) explains some more API concepts
* Learn about the most important basic Kubernetes objects, such as [Pod](/docs/concepts/workloads/pods/pod-overview/).
@@ -166,6 +167,6 @@ and the `spec` format for a `Deployment` can be found
* [Kubernetes API 概述](/docs/reference/using-api/api-overview/) 提供关于 API 概念的进一步阐述
* 了解最重要的 Kubernetes 基本对象,例如 [Pod](/docs/concepts/workloads/pods/pod-overview/)。
* 了解 Kubernetes 中的[控制器](/docs/concepts/architecture/controller/)。
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: 标签和选择器
content_template: templates/concept
content_type: concept
weight: 40
---
<!--
@@ -8,11 +8,11 @@ weight: 40
reviewers:
- mikedanese
title: Labels and Selectors
content_template: templates/concept
content_type: concept
weight: 40
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
_Labels_ are key/value pairs that are attached to objects, such as pods.
@@ -40,10 +40,10 @@ We'll eventually index and reverse-index labels for efficient queries and watche
我们最终将标签索引和反向索引,用于高效查询和监视,使用它们在 UI 和 CLI 中进行排序和分组等。我们不希望将非标识性的、尤其是大型或结构化数据用作标签,给后者带来污染。应使用 [注解](/docs/concepts/overview/working-with-objects/annotations/) 记录非识别信息
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Motivation
@@ -375,4 +375,4 @@ See the documentation on [node selection](/docs/concepts/configuration/assign-po
通过标签进行选择的一个用例是确定节点集,方便 pod 调度。
有关更多信息,请参阅 [选择节点](/docs/concepts/configuration/assign-pod-node/) 上的文档。
{{% /capture %}}
@@ -1,10 +1,10 @@
---
title: 对象名称和IDs
content_template: templates/concept
content_type: concept
weight: 20
---
{{% capture overview %}}
<!-- overview -->
<!--
Each object in your cluster has a [_Name_](#names) that is unique for that type of resource.
@@ -36,10 +36,10 @@ See the [identifiers design doc](https://git.k8s.io/community/contributors/desig
有关名称和 UID 的精确语法规则,请参见[标识符设计文档](https://git.k8s.io/community/contributors/design-proposals/architecture/identifiers.md)。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Names
@@ -148,9 +148,10 @@ UUIDs are standardized as ISO/IEC 9834-8 and as ITU-T X.667.
Kubernetes UIDs 是通用的唯一标识符 (也叫 UUIDs).
UUIDs 是标准化的,见 ISO/IEC 9834-8 和 ITU-T X.667.
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* Read about [labels](/docs/concepts/overview/working-with-objects/labels/) in Kubernetes.
* See the [Identifiers and Names in Kubernetes](https://git.k8s.io/community/contributors/design-proposals/architecture/identifiers.md) design document.
@@ -158,4 +159,4 @@ UUIDs 是标准化的,见 ISO/IEC 9834-8 和 ITU-T X.667.
* 阅读关于 Kubernetes [labels](/docs/concepts/overview/working-with-objects/labels/)。
* 更多参见 [Kubernetes 标识符和名称设计文档](https://git.k8s.io/community/contributors/design-proposals/architecture/identifiers.md).
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: 命名空间
content_template: templates/concept
content_type: concept
weight: 30
---
<!--
@@ -10,12 +10,12 @@ reviewers:
- mikedanese
- thockin
title: Namespaces
content_template: templates/concept
content_type: concept
weight: 30
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
Kubernetes supports multiple virtual clusters backed by the same physical cluster.
@@ -24,9 +24,9 @@ These virtual clusters are called namespaces.
Kubernetes 支持多个虚拟集群,它们底层依赖于同一个物理集群。
这些虚拟集群被称为命名空间。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## When to Use Multiple Namespaces
@@ -197,9 +197,10 @@ kubectl api-resources --namespaced=true
kubectl api-resources --namespaced=false
```
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* Learn more about [creating a new namespace](/docs/tasks/administer-cluster/namespaces/#creating-a-new-namespace).
* Learn more about [deleting a namespace](/docs/tasks/administer-cluster/namespaces/#deleting-a-namespace).
@@ -207,5 +208,5 @@ kubectl api-resources --namespaced=false
* 进一步了解[建立新的命名空间](/docs/tasks/administer-cluster/namespaces/#creating-a-new-namespace)。
* 进一步了解[删除命名空间](/docs/tasks/administer-cluster/namespaces/#deleting-a-namespace)。
{{% /capture %}}
@@ -1,10 +1,10 @@
---
title: Kubernetes 对象管理
content_template: templates/concept
content_type: concept
weight: 15
---
{{% capture overview %}}
<!-- overview -->
<!--
The `kubectl` command-line tool supports several different ways to create and manage
Kubernetes objects. This document provides an overview of the different
@@ -12,9 +12,9 @@ approaches. Read the [Kubectl book](https://kubectl.docs.kubernetes.io) for
details of managing objects by Kubectl.
-->
`kubectl` 命令行工具支持多种不同的方式来创建和管理 Kubernetes 对象。本文档概述了不同的方法。阅读 [Kubectl book](https://kubectl.docs.kubernetes.io) 来了解 kubectl 管理对象的详细信息。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Management techniques
@@ -310,9 +310,10 @@ Disadvantages compared to imperative object configuration:
- 声明式对象配置难于调试并且出现异常时结果难以理解。
- 使用 diff 产生的部分更新会创建复杂的合并和补丁操作。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
- [Managing Kubernetes Objects Using Imperative Commands](/docs/tasks/manage-kubernetes-objects/imperative-command/)
@@ -331,4 +332,4 @@ Disadvantages compared to imperative object configuration:
- [Kubectl Book](https://kubectl.docs.kubernetes.io)
- [Kubernetes API 参考](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/)
{{% /capture %}}
@@ -1,10 +1,10 @@
---
title: 限制范围
content_template: templates/concept
content_type: concept
weight: 10
---
{{% capture overview %}}
<!-- overview -->
<!--
By default, containers run with unbounded [compute resources](/docs/user-guide/compute-resources) on a Kubernetes cluster.
@@ -16,10 +16,10 @@ Within a namespace, a Pod or Container can consume as much CPU and memory as def
使用资源配额,集群管理员可以以命名空间为单位,限制其资源的使用与创建。
在命名空间中,一个 Pod 或 Container 最多能够使用命名空间的资源配额所定义的 CPU 和内存用量。有人担心,一个 Pod 或 Container 会垄断所有可用的资源。LimitRange 是在命名空间内限制资源分配(给多个 Pod 或 Container)的策略对象。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
A _LimitRange_ provides constraints that can:
@@ -135,9 +135,10 @@ Neither contention nor changes to a LimitRange will affect already created resou
- 查看[如何配置每个命名空间最小和最大存储使用量](/docs/tasks/administer-cluster/limit-storage-consumption/#limitrange-to-limit-requests-for-storage)。
- 查看[配置每个命名空间的配额的详细例子](/docs/tasks/administer-cluster/quota-memory-cpu-namespace/)。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
See [LimitRanger design doc](https://git.k8s.io/community/contributors/design-proposals/resource-management/admission_control_limit_range.md) for more information.
@@ -145,4 +146,4 @@ See [LimitRanger design doc](https://git.k8s.io/community/contributors/design-pr
查看 [LimitRanger 设计文档](https://git.k8s.io/community/contributors/design-proposals/resource-management/admission_control_limit_range.md)获取更多信息。
{{% /capture %}}
@@ -2,7 +2,7 @@
approvers:
- derekwaynecarr
title: 资源配额
content_template: templates/concept
content_type: concept
weight: 10
---
@@ -11,12 +11,12 @@ weight: 10
reviewers:
- derekwaynecarr
title: Resource Quotas
content_template: templates/concept
content_type: concept
weight: 10
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
When several users or teams share a cluster with a fixed number of nodes,
@@ -29,10 +29,10 @@ Resource quotas are a tool for administrators to address this concern.
-->
资源配额是帮助管理员解决这一问题的工具。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
A resource quota, defined by a `ResourceQuota` object, provides constraints that limit
@@ -879,13 +879,14 @@ See a [detailed example for how to use resource quota](/docs/tasks/administer-cl
-->
查看[如何使用资源配额的详细示例](/docs/tasks/administer-cluster/quota-api-object/)。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
See [ResourceQuota design doc](https://git.k8s.io/community/contributors/design-proposals/resource-management/admission_control_resource_quota.md) for more information.
-->
查看[资源配额设计文档](https://git.k8s.io/community/contributors/design-proposals/resource-management/admission_control_resource_quota.md)了解更多信息。
{{% /capture %}}
@@ -1,17 +1,17 @@
---
title: Kubernetes 调度器
content_template: templates/concept
content_type: concept
weight: 50
---
<!--
---
title: Kubernetes Scheduler
content_template: templates/concept
content_type: concept
weight: 50
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
In Kubernetes, _scheduling_ refers to making sure that {{< glossary_tooltip text="Pods" term_id="pod" >}}
@@ -21,9 +21,9 @@ are matched to {{< glossary_tooltip text="Nodes" term_id="node" >}} so that
在 Kubernetes 中,_调度_ 是指将 {{< glossary_tooltip text="Pod" term_id="pod" >}} 放置到合适的
{{< glossary_tooltip text="Node" term_id="node" >}} 上,然后对应 Node 上的 {{< glossary_tooltip term_id="kubelet" >}} 才能够运行这些 pod。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Scheduling overview {#scheduling}
-->
@@ -148,8 +148,9 @@ of the scheduler:
1. [调度策略](/docs/reference/scheduling/policies) 允许你配置过滤的 _谓词(Predicates)_ 和打分的 _优先级(Priorities)_
2. [调度配置](/docs/reference/scheduling/profiles) 允许你配置实现不同调度阶段的插件,包括:`QueueSort`, `Filter`, `Score`, `Bind`, `Reserve`, `Permit` 等等。你也可以配置 kube-scheduler 运行不同的配置文件。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* Read about [scheduler performance tuning](/docs/concepts/scheduling-eviction/scheduler-perf-tuning/)
@@ -166,4 +167,4 @@ of the scheduler:
* 了解关于 [配置多个调度器](/zh/docs/tasks/administer-cluster/configure-multiple-schedulers/) 的方式
* 了解关于 [拓扑结构管理策略](/zh/docs/tasks/administer-cluster/topology-manager/)
* 了解关于 [Pod 额外开销](/zh/docs/concepts/configuration/pod-overhead/)
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: 调度器性能调优
content_template: templates/concept
content_type: concept
weight: 70
---
<!--
@@ -8,12 +8,12 @@ weight: 70
reviewers:
- bsalamat
title: Scheduler Performance Tuning
content_template: templates/concept
content_type: concept
weight: 70
---
-->
{{% capture overview %}}
<!-- overview -->
{{< feature-state for_k8s_version="1.14" state="beta" >}}
@@ -40,9 +40,9 @@ large Kubernetes clusters.
-->
这篇文章将会介绍一些在大规模 Kubernetes 集群下调度器性能优化的方式。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
In large clusters, you can tune the scheduler's behaviour balancing
@@ -273,4 +273,4 @@ After going over all the Nodes, it goes back to Node 1.
-->
在评估完所有 Node 后,将会返回到 Node 1,从头开始。
{{% /capture %}}
@@ -2,7 +2,7 @@
reviewers:
- ahg-g
title: 调度框架
content_template: templates/concept
content_type: concept
weight: 60
---
@@ -11,12 +11,12 @@ weight: 60
reviewers:
- ahg-g
title: Scheduling Framework
content_template: templates/concept
content_type: concept
weight: 60
---
-->
{{% capture overview %}}
<!-- overview -->
{{< feature-state for_k8s_version="1.15" state="alpha" >}}
@@ -34,9 +34,9 @@ framework.
[kep]: https://github.com/kubernetes/enhancements/blob/master/keps/sig-scheduling/20180409-scheduling-framework.md
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
# Framework workflow
@@ -458,4 +458,4 @@ Learn more at [multiple profiles](/docs/reference/scheduling/profiles/#multiple-
如果你正在使用 Kubernetes v1.18 或更高版本,你可以将一组插件设置为一个调度器配置文件,然后定义不同的配置文件来满足各类工作负载。
了解更多关于 [多配置文件](/docs/reference/scheduling/profiles/#multiple-profiles)。
{{% /capture %}}
@@ -1,12 +1,12 @@
---
title: 使用 HostAliases 向 Pod /etc/hosts 文件添加条目
content_template: templates/concept
content_type: concept
weight: 60
---
{{< toc >}}
{{% capture overview %}}
<!-- overview -->
<!--
Adding entries to a Pod's /etc/hosts file provides Pod-level override of hostname resolution when DNS and other options are not applicable. In 1.7, users can add these custom entries with the HostAliases field in PodSpec.
@@ -17,9 +17,9 @@ Modification not using HostAliases is not suggested because the file is managed
当 DNS 配置以及其它选项不合理的时候,通过向 Pod 的 /etc/hosts 文件中添加条目,可以在 Pod 级别覆盖对主机名的解析。在 1.7 版本,用户可以通过 PodSpec 的 HostAliases 字段来添加这些自定义的条目。
建议通过使用 HostAliases 来进行修改,因为该文件由 Kubelet 管理,并且可以在 Pod 创建/重启过程中被重写。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Default Hosts File Content
@@ -176,5 +176,5 @@ kubelet [管理](https://github.com/kubernetes/kubernetes/issues/14633) Pod 中
因为该文件是托管性质的文件,无论容器重启或 Pod 重新调度,用户修改该 hosts 文件的任何内容,都会在 Kubelet 重新安装后被覆盖。因此,不建议修改该文件的内容。
{{% /capture %}}
@@ -1,11 +1,11 @@
---
title: 应用连接到 Service
content_template: templates/concept
content_type: concept
weight: 30
---
{{% capture overview %}}
<!-- overview -->
<!--
## The Kubernetes model for connecting containers
@@ -38,9 +38,9 @@ Kubernetes 假设 Pod 可与其它 Pod 通信,不管它们在哪个主机上
该指南使用一个简单的 Nginx server 来演示并证明谈到的概念。同样的原则也体现在一个更加完整的 [Jenkins CI 应用](http://kubernetes.io/blog/2015/07/strong-simple-ssl-for-kubernetes.html) 中。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Exposing pods to the cluster
@@ -598,9 +598,10 @@ LoadBalancer Ingress: a320587ffd19711e5a37606cf4a74574-1142138393.us-east-1.el
...
```
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
Kubernetes also supports Federated Services, which can span multiple
@@ -613,4 +614,3 @@ for further information.
Kubernetes 也支持联合 Service,能够跨多个集群和云提供商,为 Service 提供逐步增强的可用性、更优的容错、更好的可伸缩性。
查看 [联合 Service 用户指南](/docs/concepts/cluster-administration/federation-service-discovery/) 获取更进一步信息。
{{% /capture %}}
@@ -1,17 +1,17 @@
---
title: Pod 与 Service 的 DNS
content_template: templates/concept
content_type: concept
weight: 20
---
{{% capture overview %}}
<!-- overview -->
<!--
This page provides an overview of DNS support by Kubernetes.
-->
该页面概述了Kubernetes对DNS的支持。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Introduction
@@ -404,9 +404,10 @@ Pod DNS 配置和 DNS 策略 "`None`" 的版本对应如下所示。
| 1.10 | Beta (on by default)|
| 1.9 | Alpha |
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
For guidance on administering DNS configurations, check
@@ -416,5 +417,5 @@ For guidance on administering DNS configurations, check
有关管理 DNS 配置的指导,请查看
[配置 DNS 服务](/docs/tasks/administer-cluster/dns-custom-nameservers/)
{{% /capture %}}
@@ -5,7 +5,7 @@ feature:
description: >
Allocation of IPv4 and IPv6 addresses to Pods and Services
content_template: templates/concept
content_type: concept
weight: 70
---
<!--
@@ -20,12 +20,12 @@ feature:
description: >
Allocation of IPv4 and IPv6 addresses to Pods and Services
content_template: templates/concept
content_type: concept
weight: 70
---
-->
{{% capture overview %}}
<!-- overview -->
{{< feature-state for_k8s_version="v1.16" state="alpha" >}}
@@ -39,9 +39,9 @@ If you enable IPv4/IPv6 dual-stack networking for your Kubernetes cluster, the c
-->
如果你为 Kubernetes 集群启用了 IPv4/IPv6 双协议栈网络,则该集群将支持同时分配 IPv4 和 IPv6 地址。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Supported Features
@@ -185,14 +185,15 @@ The use of publicly routable and non-publicly routable IPv6 address blocks is ac
-->
* Kubenet 强制 IPv4IPv6 的 IPs 位置报告 (--cluster-cidr)
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* [Validate IPv4/IPv6 dual-stack](/docs/tasks/network/validate-dual-stack) networking
-->
* [验证 IPv4/IPv6 双协议栈](/docs/tasks/network/validate-dual-stack)网络
{{% /capture %}}
@@ -7,7 +7,7 @@ feature:
description: >
Kubernetes 集群中网络端点的可扩展跟踪。
content_template: templates/concept
content_type: concept
weight: 10
---
@@ -21,12 +21,12 @@ feature:
description: >
Scalable tracking of network endpoints in a Kubernetes cluster.
content_template: templates/concept
content_type: concept
weight: 10
---
-->
{{% capture overview %}}
<!-- overview -->
{{< feature-state for_k8s_version="v1.17" state="beta" >}}
@@ -37,9 +37,9 @@ Endpoints.
-->
_Endpoint Slices_ 提供了一种简单的方法来跟踪 Kubernetes 集群中的网络端点(network endpoints)。它们为 Endpoints 提供了一种可伸缩和可拓展的替代方案。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Endpoint Slice resources {#endpointslice-resource}
@@ -137,9 +137,10 @@ Endpoints API 提供了一种简单明了的方法在 Kubernetes 中跟踪网络
由于服务的所有网络端点都存储在单个 Endpoints 资源中,因此这些资源可能会变得很大。这影响了 Kubernetes 组件(尤其是主控制平面)的性能,并在 Endpoints 发生更改时导致大量网络流量和处理。Endpoint Slices 可帮助您缓解这些问题并提供可扩展的
附加特性(例如拓扑路由)平台。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* [Enabling Endpoint Slices](/docs/tasks/administer-cluster/enabling-endpoint-slices)
@@ -147,4 +148,4 @@ Endpoints API 提供了一种简单明了的方法在 Kubernetes 中跟踪网络
-->
* [启用 Endpoint Slices](/docs/tasks/administer-cluster/enabling-endpoint-slices)
* 阅读 [Connecting Applications with Services](/docs/concepts/services-networking/connect-applications-service/)
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: Ingress 控制器
content_template: templates/concept
content_type: concept
weight: 40
---
@@ -8,12 +8,12 @@ weight: 40
---
title: Ingress Controllers
reviewers:
content_template: templates/concept
content_type: concept
weight: 40
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
In order for the Ingress resource to work, the cluster must have an ingress controller running.
@@ -35,9 +35,9 @@ Kubernetes as a project currently supports and maintains [GCE](https://git.k8s.i
Kubernetes 作为一个项目,目前支持和维护 [GCE](https://git.k8s.io/ingress-gce/README.md)
和 [nginx](https://git.k8s.io/ingress-nginx/README.md) 控制器。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Additional controllers
@@ -121,13 +121,14 @@ Make sure you review your ingress controller's documentation to understand the c
确保您查看了 ingress 控制器的文档,以了解选择它的注意事项。
{{< /note >}}
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* Learn more about [Ingress](/docs/concepts/services-networking/ingress/).
* [Set up Ingress on Minikube with the NGINX Controller](/docs/tasks/access-application-cluster/ingress-minikube).
-->
* 进一步了解 [Ingress](/docs/concepts/services-networking/ingress/)。
* [在 Minikube 上使用 NGINX 控制器安装 Ingress](/docs/tasks/access-application-cluster/ingress-minikube)。
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: Ingress
content_template: templates/concept
content_type: concept
weight: 40
---
<!--
@@ -8,17 +8,17 @@ weight: 40
reviewers:
- bprashanth
title: Ingress
content_template: templates/concept
content_type: concept
weight: 40
---
-->
{{% capture overview %}}
<!-- overview -->
{{< feature-state for_k8s_version="v1.1" state="beta" >}}
{{< glossary_definition term_id="ingress" length="all" >}}
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Terminology
@@ -818,9 +818,10 @@ You can expose a Service in multiple ways that don't directly involve the Ingres
* 使用 [Service.Type=LoadBalancer](/docs/concepts/services-networking/service/#loadbalancer)
* 使用 [Service.Type=NodePort](/docs/concepts/services-networking/service/#nodeport)
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* Learn about the [Ingress API](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#ingress-v1beta1-networking-k8s-io)
* Learn about [Ingress Controllers](/docs/concepts/services-networking/ingress-controllers/)
@@ -829,4 +830,4 @@ You can expose a Service in multiple ways that don't directly involve the Ingres
* 了解更多 [Ingress API](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#ingress-v1beta1-networking-k8s-io)
* 了解更多 [Ingress 控制器](/docs/concepts/services-networking/ingress-controllers/)
* [使用 NGINX 控制器在 Minikube 上安装 Ingress](/docs/tasks/access-application-cluster/ingress-minikube)
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: 网络策略
content_template: templates/concept
content_type: concept
weight: 50
---
@@ -11,14 +11,14 @@ reviewers:
- caseydavenport
- danwinship
title: Network Policies
content_template: templates/concept
content_type: concept
weight: 50
---
-->
{{< toc >}}
{{% capture overview %}}
<!-- overview -->
<!--
A network policy is a specification of how groups of {{< glossary_tooltip text="pods" term_id="pod">}} are allowed to communicate with each other and other network endpoints.
@@ -30,9 +30,9 @@ NetworkPolicy resources use {{< glossary_tooltip text="labels" term_id="label">}
NetworkPolicy 资源使用 {{< glossary_tooltip text="标签" term_id="label">}} 选择 Pod,并定义选定 Pod 所允许的通信规则。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Prerequisites
@@ -372,9 +372,10 @@ You must be using a {{< glossary_tooltip text="CNI" term_id="cni" >}} plugin tha
{{< /note >}}
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
- See the [Declare Network Policy](/docs/tasks/administer-cluster/declare-network-policy/)
@@ -386,4 +387,4 @@ You must be using a {{< glossary_tooltip text="CNI" term_id="cni" >}} plugin tha
来进行更多的示例演练
- 有关 NetworkPolicy 资源启用的常见场景的更多信息,请参见 [指南](https://github.com/ahmetb/kubernetes-network-policy-recipes)。
{{% /capture %}}
@@ -8,12 +8,12 @@ feature:
description: >
基于集群拓扑的服务流量路由。
content_template: templates/concept
content_type: concept
weight: 10
---
{{% capture overview %}}
<!-- overview -->
{{< feature-state for_k8s_version="v1.17" state="alpha" >}}
@@ -26,9 +26,9 @@ in the same availability zone.
`Service` 拓扑可以让一个服务基于集群的 `Node` 拓扑进行流量路由。例如,一个服务可以指定流量是被优先路由到一个和客户端在同一个 `Node` 或者在同一可用区域的端点。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Introduction
@@ -176,9 +176,10 @@ traffic as follows.
* 通配符:`"*"`,如果要用,那必须是拓扑键值的最后一个值。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* Read about [enabling Service Topology](/docs/tasks/administer-cluster/enabling-service-topology)
@@ -188,4 +189,4 @@ traffic as follows.
* 阅读关于[启用服务拓扑](/docs/tasks/administer-cluster/enabling-service-topology)
* 阅读[用 `Services` 连接应用程序](/zh/docs/concepts/services-networking/connect-applications-service/)
{{% /capture %}}
@@ -7,7 +7,7 @@ feature:
description: >
无需修改您的应用程序即可使用陌生的服务发现机制。Kubernetes 为容器提供了自己的 IP 地址和一个 DNS 名称,并且可以在它们之间实现负载平衡。
content_template: templates/concept
content_type: concept
weight: 10
---
@@ -21,12 +21,12 @@ feature:
description: >
No need to modify your application to use an unfamiliar service discovery mechanism. Kubernetes gives containers their own IP addresses and a single DNS name for a set of containers, and can load-balance across them.
content_template: templates/concept
content_type: concept
weight: 10
---
-->
{{% capture overview %}}
<!-- overview -->
{{< glossary_definition term_id="service" length="short" >}}
@@ -38,9 +38,9 @@ and can load-balance across them.
使用Kubernetes,您无需修改应用程序即可使用不熟悉的服务发现机制。
Kubernetes为Pods提供自己的IP地址和一组Pod的单个DNS名称,并且可以在它们之间进行负载平衡。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Motivation
@@ -1872,9 +1872,10 @@ Kubernetes 项目打算为 L7HTTP`Service` 改进我们对它的支持。
Kubernetes 项目打算为 `Service` 实现更加灵活的请求进入模式,这些 `Service` 包含当前 `ClusterIP``NodePort``LoadBalancer` 模式,或者更多。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* Read [Connecting Applications with Services](/docs/concepts/services-networking/connect-applications-service/)
@@ -1886,4 +1887,4 @@ Kubernetes 项目打算为 `Service` 实现更加灵活的请求进入模式,
* 阅读 [Ingress](/docs/concepts/services-networking/ingress/)
* 阅读 [Endpoint Slices](/docs/concepts/services-networking/endpoint-slices/)
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: 动态卷供应
content_template: templates/concept
content_type: concept
weight: 40
---
<!--
@@ -11,12 +11,12 @@ reviewers:
- thockin
- msau42
title: Dynamic Volume Provisioning
content_template: templates/concept
content_type: concept
weight: 40
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
Dynamic volume provisioning allows storage volumes to be created on-demand.
@@ -32,9 +32,9 @@ automatically provisions storage when it is requested by users.
然后在 Kubernetes 集群创建 [`PersistentVolume` 对象](/docs/concepts/storage/persistent-volumes/)来表示这些卷。
动态供应功能消除了集群管理员预先配置存储的需要。 相反,它在用户请求时自动供应存储。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Background
@@ -212,4 +212,4 @@ Mode](/docs/concepts/storage/storage-classes/#volume-binding-mode).
单区域存储后端应该被供应到 Pod 被调度到的区域。
这可以通过设置[卷绑定模式](/docs/concepts/storage/storage-classes/#volume-binding-mode)来实现。
{{% /capture %}}
@@ -5,11 +5,11 @@ reviewers:
- thockin
- msau42
title: Storage Classes
content_template: templates/concept
content_type: concept
weight: 30
---
{{% capture overview %}}
<!-- overview -->
<!--
This document describes the concept of a StorageClass in Kubernetes. Familiarity
@@ -19,9 +19,9 @@ with [volumes](/docs/concepts/storage/volumes/) and
本文描述了 Kubernetes 中 StorageClass 的概念。建议先熟悉 [](/docs/concepts/storage/volumes/) 和
[持久卷](/docs/concepts/storage/persistent-volumes) 的概念。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Introduction
@@ -1246,4 +1246,4 @@ PersistentVolumeClaim.
-->
延迟卷绑定使得调度器在为 PersistentVolumeClaim 选择一个合适的 PersistentVolume 时能考虑到所有 pod 的调度限制。
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: 特定于节点的卷数限制
content_template: templates/concept
content_type: concept
---
<!-- ---
@@ -10,11 +10,11 @@ reviewers:
- thockin
- msau42
title: Node-specific Volume Limits
content_template: templates/concept
content_type: concept
---
-->
{{% capture overview %}}
<!-- overview -->
<!-- This page describes the maximum number of volumes that can be attached
to a Node for various cloud providers. -->
@@ -30,9 +30,9 @@ Kubernetes 需要尊重这些限制。 否则,在节点上调度的 Pod 可能
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Kubernetes default limits
@@ -150,4 +150,4 @@ Kubernetes 允许 39 个卷关联至节点。
* 对于由已迁移到 CSI 驱动程序的树内插件管理的卷,最大卷数将是 CSI 驱动程序报告的卷数。
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: CSI 卷克隆
content_template: templates/concept
content_type: concept
weight: 30
---
@@ -12,12 +12,12 @@ reviewers:
- thockin
- msau42
title: CSI Volume Cloning
content_template: templates/concept
content_type: concept
weight: 30
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
This document describes the concept of cloning existing CSI Volumes in Kubernetes. Familiarity with [Volumes](/docs/concepts/storage/volumes) is suggested.
@@ -25,10 +25,10 @@ This document describes the concept of cloning existing CSI Volumes in Kubernete
本文档介绍 Kubernetes 中克隆现有 CSI 卷的概念。阅读前建议先熟悉[](/docs/concepts/storage/volumes)。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Introduction
@@ -137,4 +137,4 @@ Upon availability of the new PVC, the cloned PVC is consumed the same as other P
一旦新的 PVC 可用,被克隆的 PVC 项其他 PVC 一样被使用。可以预期的是,新创建的 PVC 是一个独立的对象。可以独立使用,克隆,快照或删除它,而不需要考虑它的原始数据源 PVC。这也意味着,源没有以任何方式链接到新创建的 PVC,它也可以被修改或删除,而不会影响到新创建的克隆。
{{% /capture %}}
@@ -1,10 +1,10 @@
---
title: 卷快照类
content_template: templates/concept
content_type: concept
weight: 30
---
{{% capture overview %}}
<!-- overview -->
<!--
This document describes the concept of `VolumeSnapshotClass` in Kubernetes. Familiarity
@@ -13,10 +13,10 @@ with [volume snapshots](/docs/concepts/storage/volume-snapshots/) and
-->
本文档描述了 Kubernetes 中 `VolumeSnapshotClass` 的概念。 建议熟悉[卷快照(Volume Snapshots](/docs/concepts/storage/volume-snapshots/)和[存储类(Storage Class](/docs/concepts/storage/storage-classes)。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Introduction
@@ -97,4 +97,4 @@ the volume snapshot class. Different parameters may be accepted depending on the
卷快照类具有描述属于该卷快照类的卷快照的参数。 可根据 `driver` 接受不同的参数。
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: 卷快照
content_template: templates/concept
content_type: concept
weight: 20
---
@@ -14,12 +14,12 @@ reviewers:
- xing-yang
- yuxiangqian
title: Volume Snapshots
content_template: templates/concept
content_type: concept
weight: 20
---
-->
{{% capture overview %}}
<!-- overview -->
{{< feature-state for_k8s_version="1.17" state="beta" >}}
@@ -28,9 +28,9 @@ In Kubernetes, a _VolumeSnapshot_ represents a snapshot of a volume on a storage
-->
在 Kubernetes 中,卷快照是一个存储系统上卷的快照,本文假设你已经熟悉了 Kubernetes 的 [持久卷](/docs/concepts/storage/persistent-volumes/)。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Introduction
@@ -268,4 +268,4 @@ For more details, see
-->
更多详细信息,请参阅 [卷快照和从快照还原卷](/docs/concepts/storage/persistent-volumes/#volume-snapshot-and-restore-volume-from-snapshot-support)。
{{% /capture %}}
+8 -7
View File
@@ -5,11 +5,11 @@ reviewers:
- thockin
- msau42
title: Volumes
content_template: templates/concept
content_type: concept
weight: 10
---
{{% capture overview %}}
<!-- overview -->
<!--
On-disk files in a Container are ephemeral, which presents some problems for
@@ -31,10 +31,10 @@ Familiarity with [Pods](/docs/user-guide/pods) is suggested.
阅读本文前建议您熟悉一下 [Pods](/docs/user-guide/pods)。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Background
@@ -2401,9 +2401,10 @@ sudo systemctl daemon-reload
sudo systemctl restart docker
```
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* Follow an example of [deploying WordPress and MySQL with Persistent Volumes](/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/).
@@ -2411,4 +2412,4 @@ sudo systemctl restart docker
* 参考[使用持久卷部署 WordPress 和 MySQL](/zh/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/) 示例。
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: CronJob
content_template: templates/concept
content_type: concept
weight: 80
---
@@ -11,12 +11,12 @@ reviewers:
- soltysh
- janetkuo
title: CronJob
content_template: templates/concept
content_type: concept
weight: 80
---
-->
{{% capture overview %}}
<!-- overview -->
{{< feature-state for_k8s_version="v1.8" state="beta" >}}
@@ -62,10 +62,10 @@ For instructions on creating and working with cron jobs, and for an example of a
有关创建和使用 CronJob 的说明及规范文件的示例,请参见[使用 CronJob 运行自动化任务](/docs/tasks/job/automated-tasks-with-cron-jobs)。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Cron Job Limitations
@@ -133,4 +133,5 @@ the Job in turn is responsible for the management of the Pods it represents.
-->
CronJob 仅负责创建与其调度时间相匹配的 Job,而 Job 又负责管理其代表的 Pod。
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: DaemonSet
content_template: templates/concept
content_type: concept
weight: 50
---
@@ -13,12 +13,12 @@ reviewers:
- janetkuo
- kow3ns
title: DaemonSet
content_template: templates/concept
content_type: concept
weight: 50
---
--->
{{% capture overview %}}
<!-- overview -->
<!--
A _DaemonSet_ ensures that all (or some) Nodes run a copy of a Pod. As nodes are added to the
@@ -51,10 +51,10 @@ different flags and/or different memory and cpu requests for different hardware
一个稍微复杂的用法是单独对每种 daemon 类型使用多个 DaemonSet,但具有不同的标志,
并且对不同硬件类型具有不同的内存、CPU 要求。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Writing a DaemonSet Spec
@@ -391,4 +391,4 @@ DaemonSet 与 [Deployments](/docs/concepts/workloads/controllers/deployment/)
为无状态的 Service 使用 Deployments,比如前端 Frontend 服务,实现对副本的数量进行扩缩容、平滑升级,比基于精确控制 Pod 运行在某个主机上要重要得多。
需要 Pod 副本总是运行在全部或特定主机上,并需要先于其他 Pod 启动,当这被认为非常重要时,应该使用 Daemon Controller。
{{% /capture %}}
@@ -9,11 +9,11 @@ feature:
<!-- Kubernetes progressively rolls out changes to your application or its configuration, while monitoring application health to ensure it doesn't kill all your instances at the same time. If something goes wrong, Kubernetes will rollback the change for you. Take advantage of a growing ecosystem of deployment solutions. -->
Kubernetes 会逐步推出针对应用或其配置的更改,确保在监视应用程序运行状况的同时,不会终止所有实例。如果出现问题,Kubernetes 会为您回滚更改。充分利用不断成长的部署解决方案生态系统。
content_template: templates/concept
content_type: concept
weight: 30
---
{{% capture overview %}}
<!-- overview -->
<!--
@@ -40,9 +40,9 @@ Do not manage ReplicaSets owned by a Deployment. Consider opening an issue in th
{{< /note >}}
{{% /capture %}}
{{% capture body %}}
<!-- body -->
You describe a _desired state_ in a Deployment, and the Deployment controller changes the actual state to the desired state at a controlled rate. You can define Deployments to create new ReplicaSets, or to remove existing Deployments and adopt all their resources with new Deployments.
@@ -2197,4 +2197,4 @@ additional features, such as rolling back to any previous revision even after th
-->
[`kubectl rolling update`](/docs/reference/generated/kubectl/kubectl-commands#rolling-update)更新 Pods 和副本控制器的方式类似。但是,建议采取 Deployments 的方式来更新,因为它们是声明性的,在服务器端,并且具有其他功能,例如,即使在滚动更新完成后,也会回滚到以前的任何修改版本。
{{% /capture %}}
@@ -1,18 +1,18 @@
---
title: 垃圾收集
content_template: templates/concept
content_type: concept
weight: 60
---
<!--
---
title: Garbage Collection
content_template: templates/concept
content_type: concept
weight: 60
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
The role of the Kubernetes garbage collector is to delete certain objects
@@ -21,10 +21,10 @@ that once had an owner, but no longer have an owner.
Kubernetes 垃圾收集器的作用是删除某些曾经拥有所有者(owner)但现在不再拥有所有者的对象。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Owners and dependents
@@ -288,10 +288,11 @@ Tracked at [#26120](https://github.com/kubernetes/kubernetes/issues/26120)
跟踪 [#26120](https://github.com/kubernetes/kubernetes/issues/26120)
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
@@ -303,7 +304,7 @@ Tracked at [#26120](https://github.com/kubernetes/kubernetes/issues/26120)
[设计文档 2](https://git.k8s.io/community/contributors/design-proposals/api-machinery/synchronous-garbage-collection.md)
{{% /capture %}}
@@ -4,11 +4,11 @@ reviewers:
- bprashanth
- madhusudancs
title: ReplicaSet
content_template: templates/concept
content_type: concept
weight: 10
---
{{% capture overview %}}
<!-- overview -->
<!--
ReplicaSet is the next-generation Replication Controller. The only difference
@@ -21,9 +21,9 @@ whereas a Replication Controller only supports equality-based selector requireme
ReplicaSet 是下一代的 Replication Controller。 _ReplicaSet_ 和 [_Replication Controller_](/docs/concepts/workloads/controllers/replicationcontroller/) 的唯一区别是选择器的支持。ReplicaSet 支持新的基于集合的选择器需求,这在[标签用户指南](/docs/concepts/overview/working-with-objects/labels/#label-selectors)中有描述。而 Replication Controller 仅支持基于相等选择器的需求。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## How to use a ReplicaSet
@@ -412,5 +412,5 @@ safe to terminate when the machine is otherwise ready to be rebooted/shutdown.
对于管理那些提供主机级别功能(如主机监控和主机日志)的容器,就要用[`DaemonSet`](/docs/concepts/workloads/controllers/daemonset/) 而不用 ReplicaSet。
这些 Pod 的寿命与主机寿命有关:这些 Pod 需要先于主机上的其他 Pod 运行,并且在机器准备重新启动/关闭时安全地终止。
{{% /capture %}}
@@ -6,7 +6,7 @@ feature:
description: >
重新启动失败的容器,在节点死亡时替换并重新调度容器,杀死不响应用户定义的健康检查的容器,并且在它们准备好服务之前不会将它们公布给客户端。
content_template: templates/concept
content_type: concept
weight: 20
---
@@ -21,11 +21,11 @@ feature:
description: >
Restarts containers that fail, replaces and reschedules containers when nodes die, kills containers that don't respond to your user-defined health check, and doesn't advertise them to clients until they are ready to serve.
content_template: templates/concept
content_type: concept
weight: 20
-->
{{% capture overview %}}
<!-- overview -->
<!--
A [`Deployment`](/docs/concepts/workloads/controllers/deployment/) that configures a [`ReplicaSet`](/docs/concepts/workloads/controllers/replicaset/) is now the recommended way to set up replication.
@@ -41,10 +41,10 @@ always up and available.
-->
_ReplicationController_ 确保在任何时候都有特定数量的 pod 副本处于运行状态。
换句话说,ReplicationController 确保一个 pod 或一组同类的 pod 总是可用的。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## How a ReplicationController Works
@@ -560,4 +560,4 @@ Read [Run Stateless AP Replication Controller](/docs/tutorials/stateless-applica
请阅读[运行无状态的 Replication Controller](/docs/tutorials/stateless-application/run-stateless-ap-replication-controller/)。
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: StatefulSets
content_template: templates/concept
content_type: concept
weight: 40
---
@@ -14,12 +14,12 @@ reviewers:
- kow3ns
- smarterclayton
title: StatefulSets
content_template: templates/concept
content_type: concept
weight: 40
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
StatefulSet is the workload API object used to manage stateful applications.
@@ -28,9 +28,9 @@ StatefulSet is the workload API object used to manage stateful applications.
StatefulSet 是用来管理有状态应用的工作负载 API 对象。
{{< glossary_definition term_id="statefulset" length="all" >}}
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Using StatefulSets
@@ -433,8 +433,9 @@ StatefulSet will then begin to recreate the Pods using the reverted template.
恢复模板后,还必须删除 StatefulSet 尝试使用错误的配置来运行的 Pod。这样,StatefulSet 才会开始使用被还原的模板来重新创建 Pod。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* Follow an example of [deploying a stateful application](/docs/tutorials/stateful-application/basic-stateful-set/).
@@ -446,5 +447,5 @@ StatefulSet will then begin to recreate the Pods using the reverted template.
* 示例二:[使用 StatefulSet 部署 Cassandra](/docs/tutorials/stateful-application/cassandra/)。
* 示例三:[运行多副本的有状态应用程序](/docs/tasks/run-application/run-replicated-stateful-application/)。
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: 已完成资源的 TTL 控制器
content_template: templates/concept
content_type: concept
weight: 65
---
<!--
@@ -8,12 +8,12 @@ weight: 65
reviewers:
- janetkuo
title: TTL Controller for Finished Resources
content_template: templates/concept
content_type: concept
weight: 65
---
-->
{{% capture overview %}}
<!-- overview -->
{{< feature-state for_k8s_version="v1.12" state="alpha" >}}
@@ -33,10 +33,10 @@ Alpha Disclaimer: this feature is currently alpha, and can be enabled with both
-->
Alpha 免责声明:此功能目前是 alpha 版,并且可以通过 kube-apiserver 和 kube-controller-manager [特性开关](/docs/reference/command-line-tools-reference/feature-gates/) `TTLAfterFinished` 启用。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## TTL Controller
@@ -124,9 +124,10 @@ very small. Please be aware of this risk when setting a non-zero TTL.
-->
在 Kubernetes 中,需要在所有节点上运行 NTP(参见 [#6159](https://github.com/kubernetes/kubernetes/issues/6159#issuecomment-93844058))以避免时间偏差。时钟并不总是如此正确,但差异应该很小。设置非零 TTL 时请注意避免这种风险。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
[Clean up Jobs automatically](/docs/concepts/workloads/controllers/jobs-run-to-completion/#clean-up-finished-jobs-automatically)
@@ -138,4 +139,4 @@ very small. Please be aware of this risk when setting a non-zero TTL.
-->
[设计文档](https://github.com/kubernetes/enhancements/blob/master/keps/sig-apps/0026-ttl-after-finish.md)
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: 干扰
content_template: templates/concept
content_type: concept
weight: 60
---
@@ -11,12 +11,12 @@ reviewers:
- foxish
- davidopp
title: Disruptions
content_template: templates/concept
content_type: concept
weight: 60
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
This guide is for application owners who want to build
highly available applications, and thus need to understand
@@ -32,10 +32,10 @@ cluster actions, like upgrading and autoscaling clusters.
文档同样适用于想要执行自动化集群操作(例如升级和自动扩展集群)的集群管理员。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Voluntary and Involuntary Disruptions
@@ -511,10 +511,11 @@ the nodes in your cluster, such as a node or system software upgrade, here are s
- 编写可容忍干扰的应用程序是棘手的,但对于支持容忍自愿干扰所做的工作,和支持自动扩缩和容忍非
愿干扰所做工作相比,有大量的重叠
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* Follow steps to protect your application by [configuring a Pod Disruption Budget](/docs/tasks/run-application/configure-pdb/).
@@ -529,4 +530,4 @@ the nodes in your cluster, such as a node or system software upgrade, here are s
* 了解更多关于[排空节点](/docs/tasks/administer-cluster/safely-drain-node/)的信息。
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: 临时容器
content_template: templates/concept
content_type: concept
weight: 80
---
@@ -10,12 +10,12 @@ reviewers:
- verb
- yujuhong
title: Ephemeral Containers
content_template: templates/concept
content_type: concept
weight: 80
---
-->
{{% capture overview %}}
<!-- overview -->
{{< feature-state state="alpha" for_k8s_version="v1.16" >}}
@@ -40,9 +40,9 @@ feature could change significantly in the future or be removed entirely.
临时容器处于早期的 alpha 阶段,不适用于生产环境集群。应该预料到临时容器在某些情况下不起作用,例如在定位容器的命名空间时。根据 [Kubernetes 弃用政策](/docs/reference/using-api/deprecation-policy/),该 alpha 功能将来可能发生重大变化或完全删除。
{{< /warning >}}
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Understanding ephemeral containers
@@ -321,4 +321,4 @@ PID USER TIME COMMAND
29 root 0:00 ps auxww
```
{{% /capture %}}
@@ -2,10 +2,10 @@
approvers:
- erictune
title: Init 容器
content_template: templates/concept
content_type: concept
---
{{% capture overview %}}
<!-- overview -->
<!--
This page provides an overview of init containers: specialized containers that run before app containers in a {{< glossary_tooltip text="Pod" term_id="pod" >}}.
@@ -13,14 +13,14 @@ Init containers can contain utilities or setup scripts not present in an app ima
-->
本页提供了 Init 容器的概览,它是一种专用的容器,在{{< glossary_tooltip text="Pod" term_id="pod" >}}内的应用容器启动之前运行,并包括一些应用镜像中不存在的实用工具和安装脚本。
{{% /capture %}}
<!--
You can specify init containers in the Pod specification alongside the `containers` array (which describes app containers).
-->
你可以在Pod的规格信息中与containers数组同级的位置指定 Init 容器。
{{% capture body %}}
<!-- body -->
<!--
@@ -432,10 +432,11 @@ Pod重启导致 Init 容器重新执行,主要有如下几个原因:
* 当 `restartPolicy` 设置为 Always,Pod 中所有容器会终止而强制重启,由于垃圾收集导致 Init 容器的完成记录丢失。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* Read about [creating a Pod that has an init container](/docs/tasks/configure-pod-container/configure-pod-initialization/#create-a-pod-that-has-an-init-container)
@@ -444,4 +445,4 @@ Pod重启导致 Init 容器重新执行,主要有如下几个原因:
* 阅读[创建包含 Init 容器的 Pod](/docs/tasks/configure-pod-container/configure-pod-initialization/#create-a-pod-that-has-an-init-container)
* 学习如何[调测 Init 容器](/docs/tasks/debug-application-cluster/debug-init-containers/)
{{% /capture %}}
@@ -1,18 +1,18 @@
---
title: Pod 的生命周期
content_template: templates/concept
content_type: concept
---
{{% capture overview %}}
<!-- overview -->
{{< comment >}}Updated: 4/14/2015{{< /comment >}}
{{< comment >}}Edited and moved to Concepts section: 2/2/17{{< /comment >}}
该页面将描述 Pod 的生命周期。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
## Pod phase
@@ -174,7 +174,7 @@ spec:
- 节点控制器将 Pod `phase` 设置为 Failed。
- 如果是用控制器来运行,Pod 将在别处重建。
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: Pod 概览
content_template: templates/concept
content_type: concept
weight: 10
card:
name: 概念
@@ -12,7 +12,7 @@ card:
reviewers:
- erictune
title: Pod Overview
content_template: templates/concept
content_type: concept
weight: 10
card:
name: concepts
@@ -23,12 +23,12 @@ card:
<!--
This page provides an overview of `Pod`, the smallest deployable object in the Kubernetes object model.
-->
{{% capture overview %}}
<!-- overview -->
本节提供了 `Pod` 的概览信息,`Pod` 是最小可部署的 Kubernetes 对象模型。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Understanding Pods
@@ -248,7 +248,7 @@ Pod 模板就像饼干切割器,而不是指定所有副本的当前期望状
这与 Pod 形成有意的对比,Pod 指定了属于 Pod 的所有容器的当前期望状态。
这种方法从根本上简化了系统语义,增加了原语的灵活性。
{{% /capture %}}
<!--
* Learn more about [Pods](/docs/concepts/workloads/pods/pod/)
@@ -256,9 +256,10 @@ Pod 模板就像饼干切割器,而不是指定所有副本的当前期望状
* [Pod Termination](/docs/concepts/workloads/pods/pod/#termination-of-pods)
* [Pod Lifecycle](/docs/concepts/workloads/pods/pod-lifecycle/)
-->
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
* 详细了解 [Pod](/docs/concepts/workloads/pods/pod/)
* 了解有关 Pod 行为的更多信息:
* [Pod 的终止](/docs/concepts/workloads/pods/pod/#termination-of-pods)
* [Pod 的生命周期](/docs/concepts/workloads/pods/pod-lifecycle/)
{{% /capture %}}
@@ -1,20 +1,20 @@
---
title: Pod 拓扑扩展约束
content_template: templates/concept
content_type: concept
weight: 50
---
<!--
title: Pod Topology Spread Constraints
content_template: templates/concept
content_type: concept
weight: 50
---
-->
{{% capture overview %}}
<!-- overview -->
{{< feature-state for_k8s_version="v1.16" state="alpha" >}}
@@ -24,9 +24,9 @@ You can use _topology spread constraints_ to control how {{< glossary_tooltip te
可以使用*拓扑扩展约束*来控制 {{< glossary_tooltip text="Pods" term_id="Pod" >}} 在集群内故障域(例如地区,区域,节点和其他用户自定义拓扑域)之间的分布。这可以帮助实现高可用以及提升资源利用率。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Prerequisites
@@ -399,4 +399,4 @@ As of 1.16, at which this feature is Alpha, there are some known limitations:
- `Deployment` 的缩容可能导致 pod 分布不平衡。
- pod 匹配到污点节点是允许的。参考 [Issue 80921](https://github.com/kubernetes/kubernetes/issues/80921)。
{{% /capture %}}
@@ -1,17 +1,17 @@
---
title: Pods
content_template: templates/concept
content_type: concept
weight: 20
---
<!--
reviewers:
title: Pods
content_template: templates/concept
content_type: concept
weight: 20
-->
{{% capture overview %}}
<!-- overview -->
<!--
_Pods_ are the smallest deployable units of computing that can be created and
@@ -20,10 +20,10 @@ managed in Kubernetes.
_Pod_ 是可以在 Kubernetes 中创建和管理的、最小的可部署的计算单元。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## What is a Pod?
@@ -384,4 +384,4 @@ describes the object in detail.
Pod 是 Kubernetes REST API 中的顶级资源。
[Pod API 对象](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#pod-v1-core)定义详细描述了该 Pod 对象。
{{% /capture %}}
@@ -1,6 +1,6 @@
---
title: Pod Preset
content_template: templates/concept
content_type: concept
weight: 50
---
@@ -9,7 +9,7 @@ weight: 50
reviewers:
- jessfraz
title: Pod Preset
content_template: templates/concept
content_type: concept
weight: 50
---
-->
@@ -19,12 +19,12 @@ This page provides an overview of PodPresets, which are objects for injecting
certain information into pods at creation time. The information can include
secrets, volumes, volume mounts, and environment variables.
-->
{{% capture overview %}}
<!-- overview -->
本文提供了 PodPreset 的概述。 在 Pod 创建时,用户可以使用 PodPreset 对象将特定信息注入 Pod 中,这些信息可以包括 secret、 卷、卷挂载和环境变量。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Understanding Pod Presets
@@ -164,12 +164,13 @@ In order to use Pod Presets in your cluster you must ensure the following:
1. 已经通过在相应的命名空间中创建 `PodPreset` 对象,定义了 Pod Preset。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* [Injecting data into a Pod using PodPreset](/docs/tasks/inject-data-application/podpreset/)
-->
* [使用 PodPreset 将信息注入 Pod](/docs/tasks/inject-data-application/podpreset/)
{{% /capture %}}
+6 -6
View File
@@ -1,5 +1,5 @@
---
content_template: templates/concept
content_type: concept
title: 为 Kubernetes 文档做贡献
linktitle: 贡献
main_menu: true
@@ -8,7 +8,7 @@ weight: 80
<!--
---
content_template: templates/concept
content_type: concept
title: Contribute to Kubernetes docs
linktitle: Contribute
main_menu: true
@@ -16,7 +16,7 @@ weight: 80
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
If you would like to help contribute to the Kubernetes documentation or website,
@@ -42,9 +42,9 @@ Looking for the [style guide](/docs/contribute/style/style-guide/) or the
查找 [样式指南](/docs/contribute/style/style-guide/) 或者 [Kubernetes 社区网站](/community/)
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Types of contributor
@@ -188,4 +188,4 @@ documentation, but it should help you get started.
- 如果您要开发新的特性,请阅读 [contributor cheatsheet](https://github.com/kubernetes/community/tree/master/contributors/guide/contributor-cheatsheet).
{{% /capture %}}
+6 -6
View File
@@ -1,19 +1,19 @@
---
title: 高级贡献
slug: advanced
content_template: templates/concept
content_type: concept
weight: 30
---
<!--
---
title: Advanced contributing
slug: advanced
content_template: templates/concept
content_type: concept
weight: 30
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
This page assumes that you've read and mastered the
@@ -24,9 +24,9 @@ client and other tools for some of these tasks.
-->
如果你已经阅读并掌握[开始贡献](/docs/contribute/start/)和[中级贡献](/docs/contribute/intermediate/),并准备了解更多贡献的途径,请阅读此文。您需要使用 Git 命令行工具和其他工具做这些工作。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Be the PR Wrangler for a week
@@ -470,4 +470,4 @@ The video uploads automatically to YouTube.
视频会自动上传到 YouTube。
{{% /capture %}}
@@ -1,15 +1,15 @@
---
title: 为上游 Kubernetes 代码库做出贡献
content_template: templates/task
content_type: task
---
<!--
---
title: Contributing to the Upstream Kubernetes Code
content_template: templates/task
content_type: task
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
This page shows how to contribute to the upstream kubernetes/kubernetes project
@@ -31,10 +31,11 @@ API or the `kube-*` components from the upstream code, see the following instruc
- [生成 Kubernetes API 的参考文档](/docs/contribute/generate-ref-docs/kubernetes-api/)
- [生成 Kubernetes 组件和工具的参考文档](/docs/contribute/generate-ref-docs/kubernetes-components/)
{{% /capture %}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
<!--
You need to have these tools installed:
@@ -70,10 +71,10 @@ information, see
[GitHub 标准 Fork 和 PR 工作流程](https://gist.github.com/Chaser324/ce0505fbed06b947d962)。
{{% /capture %}}
{{% capture steps %}}
<!-- steps -->
<!--
## The big picture
@@ -388,9 +389,10 @@ You are now ready to follow the [Generating Reference Documentation for the Kube
现在,您可以按照[生成 Kubernetes API 的参考文档](/docs/contribute/generate-ref-docs/kubernetes-api/)指南来生成
[已发布的 Kubernetes API 参考文档](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/)。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* [Generating Reference Documentation for the Kubernetes API](/docs/contribute/generate-ref-docs/kubernetes-api/)
@@ -401,5 +403,5 @@ You are now ready to follow the [Generating Reference Documentation for the Kube
* [为 Kubernetes 组件和工具生成参考文档](/docs/home/contribute/generated-reference/kubernetes-components/)
* [生成 kubectl 命令的参考文档](/docs/home/contribute/generated-reference/kubectl/)
{{% /capture %}}
@@ -1,16 +1,16 @@
---
title: 为 kubectl 命令集生成参考文档
content_template: templates/task
content_type: task
---
<!--
---
title: Generating Reference Documentation for kubectl Commands
content_template: templates/task
content_type: task
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
This page shows how to automatically generate reference pages for the
@@ -38,10 +38,11 @@ reference page, see
本主题没有展示如何生成 [kubectl](/docs/reference/generated/kubectl/kubectl/) 组件的参考页面。相关说明请参见[为 Kubernetes 组件和工具生成参考页面](/docs/home/contribute/generated-reference/kubernetes-components/)。
{{< /note >}}
{{% /capture %}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
<!--
* You need to have
@@ -76,10 +77,10 @@ information, see
* 你需要知道如何在一个 GitHub 项目仓库中创建一个 PR。一般来说,这涉及到创建仓库的一个分支。想了解更多信息,请参见[创建一个文档 PR](/docs/home/contribute/create-pull-request/) 和 [GitHub 标准 Fork & PR 工作流](https://gist.github.com/Chaser324/ce0505fbed06b947d962)。
{{% /capture %}}
{{% capture steps %}}
<!-- steps -->
<!--
## Setting up the local repositories
@@ -470,9 +471,10 @@ topics will be visible in the
在 PR 合入的几分钟后,你更新的参考主题将出现在[已发布文档](/docs/home/)中。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* [Generating Reference Documentation for Kubernetes Components and Tools](/docs/home/contribute/generated-reference/kubernetes-components/)
@@ -484,4 +486,3 @@ topics will be visible in the
* [为 Kubernetes API 生成参考文档](/docs/home/contribute/generated-reference/kubernetes-api/)
* [为 Kubernetes 联邦 API 生成参考文档](/docs/home/contribute/generated-reference/federation-api/)
{{% /capture %}}
@@ -1,15 +1,15 @@
---
title: 为 Kubernetes API 生成参考文档
content_template: templates/task
content_type: task
---
<!--
---
title: Generating Reference Documentation for the Kubernetes API
content_template: templates/task
content_type: task
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
This page shows how to update the generated reference docs for the Kubernetes API.
@@ -30,10 +30,11 @@ Kubernetes API 参考文档是从 [Kubernetes OpenAPI 规范](https://github.com
如果您只需要从 [OpenAPI](https://github.com/OAI/OpenAPI-Specification) 规范中重新生成参考文档,请继续阅读此页面。
{{% /capture %}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
<!--
You need to have these tools installed:
@@ -58,10 +59,10 @@ information, see
-->
你需要知道如何在一个 GitHub 项目仓库中创建一个 PR。一般来说,这涉及到创建仓库的 fork 分支。想了解更多信息,请参见[创建一个文档 PR](/docs/contribute/start/) 和 [GitHub 标准 Fork & PR 工作流](https://gist.github.com/Chaser324/ce0505fbed06b947d962)。
{{% /capture %}}
{{% capture steps %}}
<!-- steps -->
<!--
## Setting up the local repositories
@@ -348,9 +349,10 @@ to monitor your pull request until it has been merged.
-->
将您的更改[创建 PR](/docs/contribute/start/) 提交到 [kubernetes/website](https://github.com/kubernetes/website) 仓库。监视您提交的 PR,并根据需要回复 reviewer 的评论。继续监视您的 PR,直到合并为止。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* [Generating Reference Docs for Kubernetes Components and Tools](/docs/home/contribute/generated-reference/kubernetes-components/)
@@ -361,4 +363,3 @@ to monitor your pull request until it has been merged.
* [为 kubectl 命令集生成参考文档](/docs/home/contribute/generated-reference/kubectl/)
* [为 Kubernetes 联邦 API 生成参考文档](/docs/home/contribute/generated-reference/federation-api/)
{{% /capture %}}
@@ -1,16 +1,16 @@
---
title: 为 Kubernetes 组件和工具生成参考页面
content_template: templates/task
content_type: task
---
<!--
---
title: Generating Reference Pages for Kubernetes Components and Tools
content_template: templates/task
content_type: task
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
This page shows how to use the `update-imported-docs` tool to generate
@@ -21,9 +21,10 @@ reference documentation for tools and components in the
本页面展示了如何使用 `update-imported-docs` 工具来为 [Kubernetes](https://github.com/kubernetes/kubernetes) 和 [Federation](https://github.com/kubernetes/federation) 仓库中的工具和组件生成参考文档。
{{% /capture %}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
<!--
* You need a machine that is running Linux or macOS.
@@ -68,9 +69,9 @@ information, see
* 你需要知道如何在一个 GitHub 项目仓库中创建一个 PR。一般来说,这涉及到创建仓库的一个分支。想了解更多信息,请参见[创建一个文档 PR](/docs/home/contribute/create-pull-request/)。
{{% /capture %}}
{{% capture steps %}}
<!-- steps -->
<!--
## Getting two repositories
@@ -395,9 +396,10 @@ topics will be visible in the
在 PR 合入的几分钟后,你更新的参考主题将出现在[已发布文档](/docs/home/)中。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* [Generating Reference Documentation for kubectl Commands](/docs/home/contribute/generated-reference/kubectl/)
@@ -409,4 +411,3 @@ topics will be visible in the
* [为 Kubernetes API 生成参考文档](/docs/home/contribute/generated-reference/kubernetes-api/)
* [为 Kubernetes 联邦 API 生成参考文档](/docs/home/contribute/generated-reference/federation-api/)
{{% /capture %}}
+9 -8
View File
@@ -1,7 +1,7 @@
---
title: 中级贡献
slug: intermediate
content_template: templates/concept
content_type: concept
weight: 20
card:
name: contribute
@@ -11,7 +11,7 @@ card:
---
title: Intermediate contributing
slug: intermediate
content_template: templates/concept
content_type: concept
weight: 20
card:
name: contribute
@@ -19,7 +19,7 @@ card:
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
This page assumes that you've read and mastered the tasks in the
@@ -36,9 +36,9 @@ Some tasks require you to use the Git command line client and other tools.
有些任务需要使用 Git 命令行客户端和其他工具。
{{< /note >}}
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
Now that you've gotten your feet wet and helped out with the Kubernetes docs in
@@ -1436,9 +1436,10 @@ Follow these guidelines for working with localized content:
如果 PR 包含对一种以上源语言的更改,请 PR 贡献者为每种语言打开单独的 PR。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
When you are comfortable with all of the tasks discussed in this topic and you
@@ -1447,4 +1448,4 @@ want to engage with the Kubernetes docs team in even deeper ways, read the
-->
如果您熟悉本主题中讨论的所有任务,并且想与 Kubernetes 文档小组进行更深入的接触,
请阅读[文档高级贡献者](/docs/contribute/advanced/)主题。
{{% /capture %}}
+9 -8
View File
@@ -1,6 +1,6 @@
---
title: 本地化 Kubernetes 文档
content_template: templates/concept
content_type: concept
card:
name: contribute
weight: 30
@@ -9,7 +9,7 @@ card:
<!--
---
title: Localizing Kubernetes Documentation
content_template: templates/concept
content_type: concept
approvers:
- remyleone
- rlenferink
@@ -21,16 +21,16 @@ card:
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
This page shows you how to [localize](https://blog.mozilla.org/l10n/2011/12/14/i18n-vs-l10n-whats-the-diff/) the docs for a different language.
-->
此页面显示了如何为其他语言的文档提供[本地化](https://blog.mozilla.org/l10n/2011/12/14/i18n-vs-l10n-whats-the-diff/)。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Getting started
@@ -540,9 +540,10 @@ You can also help add or improve content to an existing localization. Join the [
-->
您还可以向现有本地化添加或改进内容提供帮助。加入 [Slack 频道](https://kubernetes.slack.com/messages/C1J0BPD2M/)进行本地化,然后开始新建 PR 来提供帮助。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
Once a localization meets requirements for workflow and minimum output, SIG docs will:
@@ -556,4 +557,4 @@ Once a localization meets requirements for workflow and minimum output, SIG docs
- 在网站上启用语言选择
- 通过[Cloud Native Computing Foundation](https://www.cncf.io/about/) (CNCF) 频道, 包括[ Kubernetes 博客](https://kubernetes.io/blog/)公开本地化的可用性。
{{% /capture %}}
+8 -7
View File
@@ -1,12 +1,12 @@
---
title: 参与 SIG Docs
content_template: templates/concept
content_type: concept
card:
name: contribute
weight: 40
---
{{% capture overview %}}
<!-- overview -->
<!--
SIG Docs is one of the
@@ -42,9 +42,9 @@ aspects of Kubernetes -- the Kubernetes website and documentation.
有关 Kubernetes 社区中的成员如何工作的更多信息,请参见 [community-membership](https://github.com/kubernetes/community/blob/master/community-membership.md)。
本文档的其余部分概述了这些角色在 SIG Docs 中发挥作用的一些独特方式,
SIG Docs 负责维护 Kubernetes 最面向公众的方面之一 —— Kubernetes 网站和文档。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Roles and responsibilities
@@ -515,9 +515,10 @@ and editorial review of their PR.
-->
结合 OWNERS 文件及扉页可以给 PR 作者提供向谁请求检视的建议。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
For more information about contributing to the Kubernetes documentation, see:
@@ -527,6 +528,6 @@ For more information about contributing to the Kubernetes documentation, see:
- [Start contributing](/docs/contribute/start/)
- [Documentation style](/docs/contribute/style/)
{{% /capture %}}
+9 -8
View File
@@ -1,7 +1,7 @@
---
title: 开始贡献
slug: start
content_template: templates/concept
content_type: concept
weight: 10
card:
name: contribute
@@ -11,7 +11,7 @@ card:
---
title: Start contributing
slug: start
content_template: templates/concept
content_type: concept
weight: 10
card:
name: contribute
@@ -19,7 +19,7 @@ card:
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
If you want to get started contributing to the Kubernetes documentation, this
@@ -36,10 +36,10 @@ code repositories, refer to
如果您在寻找有关如何开始向 Kubernetes 仓库贡献代码的信息,请参考 [Kubernetes 社区指南](https://github.com/kubernetes/community/blob/master/governance.md)。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## The basics about our docs
@@ -620,9 +620,10 @@ to submit your proposal.
看一下[现有案例研究](https://github.com/kubernetes/website/tree/master/content/en/case-studies)的源码。
使用 [Kubernetes 案例研究提交表](https://www.cncf.io/people/end-user-community/)提交您的提案。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
When you are comfortable with all of the tasks discussed in this topic and you
@@ -631,4 +632,4 @@ want to engage with the Kubernetes docs team in deeper ways, read the
-->
当您对本主题中讨论的所有任务感到满意,并且您希望以更深入的方式与 Kubernetes 文档团队合作,请阅读[中级贡献者指南](/docs/contribute/intermediate/)。
{{% /capture %}}
@@ -1,19 +1,19 @@
---
title: 内容组织
content_template: templates/concept
content_type: concept
weight: 40
---
<!--
---
title: Content organization
content_template: templates/concept
content_type: concept
weight: 40
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
This site uses Hugo. In Hugo, [content organization](https://gohugo.io/content-management/organization/) is a core concept.
@@ -21,9 +21,9 @@ This site uses Hugo. In Hugo, [content organization](https://gohugo.io/content-m
本网站使用了 Hugo。在 Hugo 中,[内容组织](https://gohugo.io/content-management/organization/) 是一个核心概念。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
{{% note %}}
<!--
@@ -255,9 +255,10 @@ The `SASS` source of the stylesheets for this site is stored below `src/sass` an
本网站的样式表的 `SASS` 源存储在 `src/sass` 下面,可以用 `make sass` 构建(Hugo很快就会得到 `SASS` 的支持,参见https://github.com/gohugoio/hugo/issues/4243)。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* [Custom Hugo shortcodes](/docs/contribute/style/hugo-shortcodes/)
@@ -267,4 +268,4 @@ The `SASS` source of the stylesheets for this site is stored below `src/sass` an
* [定制 Hugo 短代码](/docs/contribute/style/hugo-shortcodes/)
* [样式指南](/docs/contribute/style/style-guide)
{{% /capture %}}
@@ -2,25 +2,25 @@
approvers:
- chenopis
title: 定制 Hugo 短代码
content_template: templates/concept
content_type: concept
---
<!-- ---
approvers:
- chenopis
title: Custom Hugo Shortcodes
content_template: templates/concept
content_type: concept
--- -->
{{% capture overview %}}
<!-- overview -->
<!-- This page explains the custom Hugo shortcodes that can be used in Kubernetes markdown documentation. -->
本页面将介绍定制 Hugo 短代码,可以用于 Kubernetes markdown 文档书写。
<!-- Read more about shortcodes in the [Hugo documentation](https://gohugo.io/content-management/shortcodes). -->
更多关于短代码参见 [Hugo 文档](https://gohugo.io/content-management/shortcodes)。
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!-- ## Feature state -->
## 功能状态
@@ -256,9 +256,10 @@ println "This is tab 2."
{{< /tabs >}}
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!-- * Learn about [Hugo](https://gohugo.io/).
* Learn about [writing a new topic](/docs/home/contribute/write-new-topic/).
* Learn about [using page templates](/docs/home/contribute/page-templates/).
@@ -270,4 +271,4 @@ println "This is tab 2."
* 了解 [使用页面模板](/docs/home/contribute/page-templates/)。
* 了解 [暂存修改](/docs/home/contribute/stage-documentation-changes/)。
* 了解 [创建 pull request](/docs/home/contribute/create-pull-request/)。
{{% /capture %}}
@@ -1,18 +1,18 @@
---
title: 使用页面模板
content_template: templates/concept
content_type: concept
weight: 30
---
<!--
---
title: Using Page Templates
content_template: templates/concept
content_type: concept
weight: 30
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
When contributing new topics, apply one of the following templates to them.
@@ -42,10 +42,10 @@ template to use for a new topic, start with the
{{< /note >}}
{{% /capture %}}
{{% capture body %}}
<!-- body -->
<!--
## Concept template
@@ -72,12 +72,12 @@ To write a new concept page, create a Markdown file in a subdirectory of the
要编写新的概念页面,请在 `/content/en/docs/concepts` 目录的子目录中创建一个 Markdown 文件,其特点如下:
<!--
- In the page's YAML front-matter, set `content_template: templates/concept`.
- In the page's YAML front-matter, set `content_type: concept`.
- In the page's body, set the required `capture` variables and any optional
ones you want to include:
-->
- 在页面的 YAML 头部,设置 `content_template: templates/concept`
- 在页面的 YAML 头部,设置 `content_type: concept`
- 在页面的 body 中,设置所需的 `capture` 变量和所有想要包含的变量:
| 变量 | 必需? |
@@ -153,12 +153,12 @@ To write a new task page, create a Markdown file in a subdirectory of the
要编写新的任务页面,请在 `/content/en/docs/tasks` 目录的子目录中创建一个 Markdown 文件,其特点如下:
<!--
- In the page's YAML front-matter, set `content_template: templates/task`.
- In the page's YAML front-matter, set `content_type: task`.
- In the page's body, set the required `capture` variables and any optional
ones you want to include:
-->
- 在页面的 YAML 头部,设置 `content_template: templates/task`
- 在页面的 YAML 头部,设置 `content_type: task`
- 在页面的 body 中,设置所需的 `capture` 变量和所有想要包含的变量:
| 变量 | 必需? |
@@ -253,12 +253,12 @@ To write a new tutorial page, create a Markdown file in a subdirectory of the
要编写新的教程页面,请在 `/content/en/docs/tutorials` 目录的子目录中创建一个 Markdown 文件,其特点如下:
<!--
- In the page's YAML front-matter, set `content_template: templates/tutorial`.
- In the page's YAML front-matter, set `content_type: tutorial`.
- In the page's body, set the required `capture` variables and any optional
ones you want to include:
-->
- 在页面的 YAML 头部,设置 `content_template: templates/tutorial`
- 在页面的 YAML 头部,设置 `content_type: tutorial`
- 在页面的 body 中,设置所需的 `capture` 变量和所有想要包含的变量:
| 变量 | 必需? |
@@ -337,9 +337,10 @@ An example of a published topic that uses the tutorial template is
使用教程模板的已发布主题的一个示例是[使用部署运行无状态应用程序](/docs/tutorials/stateless-application/run-stateless-application-deployment/)。
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
- Learn about the [style guide](/docs/contribute/style/style-guide/)
@@ -349,4 +350,4 @@ An example of a published topic that uses the tutorial template is
- 学习[样式指南](/docs/contribute/style/style-guide/)
- 学习[内容组织](/docs/contribute/style/content-organization/)
{{% /capture %}}
@@ -1,34 +1,35 @@
---
title: 撰写新主题
content_template: templates/task
content_type: task
weight: 20
---
<!--
---
title: Writing a new topic
content_template: templates/task
content_type: task
weight: 20
---
-->
{{% capture overview %}}
<!-- overview -->
<!--
This page shows how to create a new topic for the Kubernetes docs.
-->
本页面展示如何为 Kubernetes 文档库创建新主题。
{{% /capture %}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
<!--
Create a fork of the Kubernetes documentation repository as described in
[Start contributing](/docs/contribute/start/).
-->
如[开始贡献](/docs/contribute/start/)中所述,创建 Kubernetes 文档库的分支。
{{% /capture %}}
{{% capture steps %}}
<!-- steps -->
<!--
## Choosing a page type
@@ -305,15 +306,16 @@ image format is SVG.
将镜像文件放入 `/images` 目录。首选的镜像格式是 SVG。
{{% /capture %}}
<!--
* Learn about [using page templates](/docs/home/contribute/page-templates/).
* Learn about [staging your changes](/docs/home/contribute/stage-documentation-changes/).
* Learn about [creating a pull request](/docs/home/contribute/create-pull-request/).
-->
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
* 学习[使用页面模板](/docs/home/contribute/page-templates/)。
* 学习[展示你的修改](/docs/home/contribute/stage-documentation-changes/)。
* 学习[创建一个拉取请求](/docs/home/contribute/create-pull-request/)。
{{% /capture %}}

Some files were not shown because too many files have changed in this diff Show More