add zh pages

This commit is contained in:
Karen Bradshaw
2020-06-01 09:23:39 -04:00
parent 21fd0a12f9
commit 4b35d4d401
303 changed files with 2764 additions and 2439 deletions
@@ -1,6 +1,6 @@
---
title: StatefulSet 基础
content_template: templates/tutorial
content_type: tutorial
approvers:
- enisoc
- erictune
@@ -11,7 +11,7 @@ approvers:
---
{{% capture overview %}}
<!-- overview -->
<!--
This tutorial provides an introduction to managing applications with
@@ -21,9 +21,10 @@ demonstrates how to create, delete, scale, and update the Pods of StatefulSets.
本教程介绍如何了使用 [StatefulSets](/zh/docs/concepts/abstractions/controllers/statefulsets/) 来管理应用。演示了如何创建、删除、扩容/缩容和更新 StatefulSets 的 Pods。
{{% /capture %}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
<!--
Before you begin this tutorial, you should familiarize yourself with the
@@ -49,9 +50,10 @@ tutorial.
本教程假设你的集群被配置为动态的提供 PersistentVolumes。如果没有这样配置,在开始本教程之前,你需要手动准备 2 个 1 GiB 的存储卷。
{{% /capture %}}
{{% capture objectives %}}
## {{% heading "objectives" %}}
<!--
StatefulSets are intended to be used with stateful applications and distributed
@@ -79,10 +81,10 @@ StatefulSets 旨在与有状态的应用及分布式系统一起使用。然而
* 如何对 StatefulSet 进行扩容/缩容
* 如何更新一个 StatefulSet 的 Pods
{{% /capture %}}
{{% capture lessoncontent %}}
<!-- lessoncontent -->
## 创建 StatefulSet
@@ -1516,9 +1518,10 @@ StatefulSet 控制器将并发的删除所有 Pod,在删除一个 Pod 前不
kubectl delete svc nginx
```
{{% /capture %}}
{{% capture cleanup %}}
## {{% heading "cleanup" %}}
<!--
You will need to delete the persistent storage media for the PersistentVolumes
@@ -1528,6 +1531,6 @@ reclaimed.
-->
你需要删除本教程中用到的 PersistentVolumes 的持久化存储介质。基于你的环境、存储配置和提供方式,按照必须的步骤保证回收所有的存储。
{{% /capture %}}
@@ -2,7 +2,7 @@
title: 示例:使用 Persistent Volumes 部署 WordPress 和 MySQL
reviewers:
- ahmetb
content_template: templates/tutorial
content_type: tutorial
weight: 20
card:
name: tutorials
@@ -10,7 +10,7 @@ card:
title: "Stateful 示例: Wordpress with Persistent Volumes"
---
{{% capture overview %}}
<!-- overview -->
<!--
This tutorial shows you how to deploy a WordPress site and a MySQL database using Minikube. Both applications use PersistentVolumes and PersistentVolumeClaims to store data.
@@ -43,9 +43,10 @@ deployment 在生产场景中并不适合,它使用单实例 WordPress 和 MyS
本教程中提供的文件使用 GA Deployment API,并且特定于 kubernetes 1.9 或更高版本。如果您希望将本教程与 Kubernetes 的早期版本一起使用,请相应地更新 API 版本,或参考本教程的早期版本。
{{< /note >}}
{{% /capture %}}
{{% capture objectives %}}
## {{% heading "objectives" %}}
<!--
* Create PersistentVolumeClaims and PersistentVolumes
* Create a `kustomization.yaml` with
@@ -64,9 +65,10 @@ deployment 在生产场景中并不适合,它使用单实例 WordPress 和 MyS
* 应用整个 kustomization 目录 `kubectl apply -k ./`
* 清理
{{% /capture %}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
@@ -88,9 +90,9 @@ Download the following configuration files:
2. [wordpress-deployment.yaml](/examples/application/wordpress/wordpress-deployment.yaml)
{{% /capture %}}
{{% capture lessoncontent %}}
<!-- lessoncontent -->
<!--
## Create PersistentVolumeClaims and PersistentVolumes
@@ -424,7 +426,7 @@ kubectl apply -k ./
![wordpress-init](https://raw.githubusercontent.com/kubernetes/examples/master/mysql-wordpress-pd/WordPress.png)
{{% /capture %}}
{{< warning >}}
<!--
@@ -434,7 +436,8 @@ Do not leave your WordPress installation on this page. If another user finds it,
{{< /warning >}}
{{% capture cleanup %}}
## {{% heading "cleanup" %}}
<!--
1. Run the following command to delete your Secret, Deployments, Services and PersistentVolumeClaims:
@@ -449,9 +452,10 @@ Do not leave your WordPress installation on this page. If another user finds it,
kubectl delete -k ./
```
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
<!--
* Learn more about [Introspection and Debugging](/docs/tasks/debug-application-cluster/debug-application-introspection/)
@@ -465,4 +469,4 @@ Do not leave your WordPress installation on this page. If another user finds it,
* 了解更多关于 [Port Forwarding](/zh/docs/tasks/access-application-cluster/port-forward-access-application-cluster/)
* 了解如何 [Get a Shell to a Container](/zh/docs/tasks/debug-application-cluster/get-shell-running-container/)
{{% /capture %}}
@@ -9,15 +9,16 @@ approvers:
- smarterclayton
title: 运行 ZooKeeper 一个 CP 分布式系统
content_template: templates/tutorial
content_type: tutorial
---
{{% capture overview %}}
<!-- overview -->
本教程展示了在 Kubernetes 上使用 [PodDisruptionBudgets](/zh/docs/admin/disruptions/#specifying-a-poddisruptionbudget) 和 [PodAntiAffinity](/zh/docs/user-guide/node-selection/#inter-pod-affinity-and-anti-affinity-beta-feature) 特性运行 [Apache Zookeeper](https://zookeeper.apache.org)。
{{% /capture %}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
在开始本教程前,你应该熟悉以下 Kubernetes 概念。
@@ -38,9 +39,10 @@ content_template: templates/tutorial
本教程假设你的集群配置为动态的提供 PersistentVolumes。如果你的集群没有配置成这样,在开始本教程前,你需要手动准备三个 20 GiB 的卷。
{{% /capture %}}
{{% capture objectives %}}
## {{% heading "objectives" %}}
在学习本教程后,你将熟悉下列内容。
@@ -48,9 +50,9 @@ content_template: templates/tutorial
* 如何使用 ConfigMaps 一致性配置 ensemble。
* 如何在 ensemble 中 分布 ZooKeeper 服务的部署。
* 如何在计划维护中使用 PodDisruptionBudgets 确保服务可用性。
{{% /capture %}}
{{% capture lessoncontent %}}
<!-- lessoncontent -->
### ZooKeeper 基础
@@ -1167,11 +1169,12 @@ node "kubernetes-minion-group-ixsl" uncordoned
你可以同时使用 `kubectl drain` 和 PodDisruptionBudgets 来保证你的服务在维护过程中仍然可用。如果使用 drain 来隔离节点并在此之前删除 pods 使节点进入离线维护状态,如果服务表达了 disruption budget,这个 budget 将被遵守。你应该总是为关键服务分配额外容量,这样它们的 Pods 就能够迅速的重新调度。
{{% /capture %}}
{{% capture cleanup %}}
## {{% heading "cleanup" %}}
* 使用 `kubectl uncordon` 解除你集群中所有节点的隔离。
* 你需要删除在本教程中使用的 PersistentVolumes 的持久存储媒介。请遵循必须的步骤,基于你的环境、存储配置和准备方法,保证回收所有的存储。
{{% /capture %}}