Skip to content

Commit

Permalink
Merge pull request #14790 from ChongmingDu/tutorials
Browse files Browse the repository at this point in the history
Create website/content/zh/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro.html and deploy-interactive.html
  • Loading branch information
Xiaolong He committed Jun 12, 2019
2 parents d8dcce2 + 977f118 commit f444152
Show file tree
Hide file tree
Showing 3 changed files with 190 additions and 9 deletions.
18 changes: 9 additions & 9 deletions content/zh/docs/tutorials/kubernetes-basics/cluster-intro.html
Expand Up @@ -10,7 +10,7 @@

<main class="content">

<div class="row">
<div class="row">

<div class="col-md-8">
<!-- <h3>Objectives</h3> -->
Expand All @@ -29,7 +29,7 @@ <h3>目标</h3>

<div class="col-md-8">
<!-- <h3>Kubernetes Clusters</h3> -->
<h3>Kubernetes集群</h3>
<h3> Kubernetes 集群</h3>
<p>
<!-- <b>Kubernetes coordinates a highly available cluster of computers that are connected to work as a single unit.</b> The abstractions in Kubernetes allow you to deploy containerized applications to a cluster without tying them specifically to individual machines. To make use of this new model of deployment, applications need to be packaged in a way that decouples them from individual hosts: they need to be containerized. Containerized applications are more flexible and available than in past deployment models, where applications were installed directly onto specific machines as packages deeply integrated into the host. <b>Kubernetes automates the distribution and scheduling of application containers across a cluster in a more efficient way.</b> Kubernetes is an open-source platform and is production-ready. -->
<b>Kubernetes 是一个高可用集群,协调算力连接成一个单元工作。</b> Kubernetes 中允许您的应用抽象为容器进行部署,而无需将他们绑定在某个专门的节点上。要使用这种新的部署模式,需要将应用与主机解耦的方式打包应用:它们需要容器化。与以往的部署模式相比,容器化应用更加灵活可用,应用可以安装在指定的机器上,因为应用深度集成在主机中。</b> Kubernetes 以更有效的方式自动化跨集群分发和调度应用容器。</b> Kubernetes 是一个开源平台,可用在生产环境。
Expand All @@ -38,9 +38,9 @@ <h3>Kubernetes集群</h3>
<p>Kubernetes 集群包含两种资源类型:
<ul>
<!-- <li>The <b>Master</b> coordinates the cluster</li> -->
<li> <b> Master </b> 协调集群</li>
<li> <b> 主节点 </b> 协调集群</li>
<!-- <li><b>Nodes</b> are the workers that run applications</li> -->
<li><b> Node </b> 运行应用的工作节点</li>
<li><b> 工作节点 </b> 运行应用的工作节点</li>
</ul>
</p>
</div>
Expand Down Expand Up @@ -82,26 +82,26 @@ <h2 style="color: #3771e3;">集群示意图</h2>
<div class="row">
<div class="col-md-8">
<!-- <p><b>The Master is responsible for managing the cluster.</b> The master coordinates all activities in your cluster, such as scheduling applications, maintaining applications' desired state, scaling applications, and rolling out new updates.</p> -->
<p><b> Master 节点负责管理集群</b> master 负责协调集群中的所有活动,例如调度应用程序,维护应用程序的所需状态,扩展应用程序以及回滚更新。</p>
<p><b>主节点负责管理集群</b>主节点负责协调集群中的所有活动,例如调度应用程序,维护应用程序的所需状态,扩展应用程序以及回滚更新。</p>
<!-- <p><b>A node is a VM or a physical computer that serves as a worker machine in a Kubernetes cluster.</b> Each node has a Kubelet, which is an agent for managing the node and communicating with the Kubernetes master. The node should also have tools for handling container operations, such as Docker or rkt. A Kubernetes cluster that handles production traffic should have a minimum of three nodes.</p> -->
<p><b> Node 节点是虚拟机或物理机,充当 Kubernetes 集群中的计算节点。</b>每个节点都有一个 Kubelet ,它是一个管理节点并与 Kubernetes master 节点通信的代理。该节点还应具有用于处理容器操作的工具,例如 Docker 或 rkt 。应用于生产的 Kubernetes 集群应至少有三个节点。</p>
<p><b>工作节点是虚拟机或物理机,充当 Kubernetes 集群中的计算节点。</b>每个节点都有一个 Kubelet ,它是一个管理节点并与 Kubernetes master 节点通信的代理。该节点还应具有用于处理容器操作的工具,例如 Docker 或 rkt 。应用于生产的 Kubernetes 集群应至少有三个节点。</p>

</div>
<div class="col-md-4">
<div class="content__box content__box_fill">
<!-- <p><i>Masters manage the cluster and the nodes are used to host the running applications.</i></p> -->
<p><i> Master 节点管理集群,Node 节点用于承载运行的应用程序。</i></p>
<p><i>主节点管理集群,Node 节点用于承载运行的应用程序。</i></p>
</div>
</div>
</div>

<div class="row">
<div class="col-md-8">
<!-- <p>When you deploy applications on Kubernetes, you tell the master to start the application containers. The master schedules the containers to run on the cluster's nodes. <b>The nodes communicate with the master using the Kubernetes API</b>, which the master exposes. End users can also use the Kubernetes API directly to interact with the cluster.</p> -->
<p>在 Kubernetes 上部署应用程序时,您可以与 master 节点交互启动应用容器。 master 节点调度容器以在集群的 Node 节点上运行<b> node 节点使用 master 节点公开的 Kubernetes API </b>与 master 节点进行通信。最终用户还可以直接使用 Kubernetes API 与群集进行交互。</p>
<p>在 Kubernetes 上部署应用程序时,您可以与主节点交互启动应用容器。 主节点调度容器以在集群的工作节点上运行<b>工作节点使用主节点公开的 Kubernetes API </b>与主节点进行通信。最终用户还可以直接使用 Kubernetes API 与群集进行交互。</p>

<!-- <p>A Kubernetes cluster can be deployed on either physical or virtual machines. To get started with Kubernetes development, you can use Minikube. Minikube is a lightweight Kubernetes implementation that creates a VM on your local machine and deploys a simple cluster containing only one node. Minikube is available for Linux, macOS, and Windows systems. The Minikube CLI provides basic bootstrapping operations for working with your cluster, including start, stop, status, and delete. For this tutorial, however, you'll use a provided online terminal with Minikube pre-installed.</p> -->
<p> Kubernetes 集群可以部署在物理机或虚拟机上。要使用 Kubernetes ,您可以使用 Minikube 。 Minikube 是一种轻量级的 Kubernetes ,可以在本地机器上创建虚拟机并部署只有一个节点的简单集群。 Minikube 使用与 Linux , macOS 和 Windows 系统。Minikube CLI 提供了与集群一起使用的基本引导操作,包括启动,停止,状态和删除。但是对于本教程,您将使用预先安装了 Minikube 的在线终端。</p>
<p> Kubernetes 集群可以部署在物理机或虚拟机上。要使用 Kubernetes ,您可以使用 Minikube 。 Minikube 是一种轻量级的 Kubernetes ,可以在本地机器上创建虚拟机并部署只有一个节点的简单集群。 Minikube 使用与 Linux, macOS 和 Windows 系统。Minikube CLI 提供了与集群一起使用的基本引导操作,包括启动,停止,状态和删除。但是对于本教程,您将使用预先安装了 Minikube 的在线终端。</p>

<!-- <p>Now that you know what Kubernetes is, let's go to the online tutorial and start our first cluster!</p> -->
<p>现在你知道 Kubernetes 是什么了,让我们去在线教程开始我们的第一个集群!</p>
Expand Down
@@ -0,0 +1,45 @@
---
title: 交互式教程 - 部署应用程序
weight: 20
---

<!DOCTYPE html>

<html lang="en">

<body>

<link href="/docs/tutorials/kubernetes-basics/public/css/styles.css" rel="stylesheet">
<link href="/docs/tutorials/kubernetes-basics/public/css/overrides.css" rel="stylesheet">
<script src="https://katacoda.com/embed.js"></script>

<div class="layout" id="top">

<main class="content katacoda-content">

<br>
<div class="katacoda">
<!-- <div class="katacoda__alert">
To interact with the Terminal, please use the desktop/tablet version
</div> -->
<div class="katacoda__alert">
要与终端进行交互,请使用桌面/平板电脑版本
</div>

<div class="katacoda__box" id="inline-terminal-1" data-katacoda-id="kubernetes-bootcamp/7" data-katacoda-color="326de6" data-katacoda-secondary="273d6d" data-katacoda-hideintro="false" data-katacoda-font="Roboto" data-katacoda-fontheader="Roboto Slab" data-katacoda-prompt="Kubernetes Bootcamp Terminal" style="height: 600px;">
</div>

</div>
<div class="row">
<div class="col-md-12">
<!-- <a class="btn btn-lg btn-success" href="/docs/tutorials/kubernetes-basics/explore/explore-intro/" role="button">Continue to Module 3<span class="btn__next">›</span></a> -->
<a class="btn btn-lg btn-success" href="/docs/tutorials/kubernetes-basics/explore/explore-intro/" role="button">继续阅读第3单元<span class="btn__next"></span></a>
</div>
</div>

</main>

</div>

</body>
</html>
@@ -0,0 +1,136 @@
---
title: 使用 kubectl 创建 Deployment
weight: 10
---

<!DOCTYPE html>

<html lang="en">

<body>

<link href="/docs/tutorials/kubernetes-basics/public/css/styles.css" rel="stylesheet">

<div class="layout" id="top">

<main class="content">

<div class="row">

<div class="col-md-8">
<!-- <h3>Objectives</h3> -->
<h3>目标</h3>
<!-- <ul>
<li>Learn about application Deployments.</li>
<li>Deploy your first app on Kubernetes with kubectl.</li>
</ul> -->
<ul>
<li>学习了解应用的部署</li>
<li>使用 kubectl 在 Kubernetes 上部署第一个应用</li>
</ul>
</div>

<div class="col-md-8">
<!-- <h3>Kubernetes Deployments</h3> -->
<h3>Kubernetes 部署</h3>
<!-- <p>
Once you have a running Kubernetes cluster, you can deploy your containerized applications on top of it.
To do so, you create a Kubernetes <b>Deployment</b> configuration. The Deployment instructs Kubernetes
how to create and update instances of your application. Once you've created a Deployment, the Kubernetes
master schedules mentioned application instances onto individual Nodes in the cluster.
</p> -->
<p>
一旦运行了 Kubernetes 集群,就可以在其上部署容器化应用程序。
为此,您需要创建 Kubernetes <b> Deployment </b>配置。Deployment 指挥 Kubernetes 如何创建和更新应用程序的实例。创建 Deployment 后,Kubernetes master 将应用程序实例调度到集群中的各个节点上。
</p>

<!-- <p>Once the application instances are created, a Kubernetes Deployment Controller continuously monitors those instances. If the Node hosting an instance goes down or is deleted, the Deployment controller replaces the instance with an instance on another Node in the cluster. <b>This provides a self-healing mechanism to address machine failure or maintenance.</b></p> -->
<p>创建应用程序实例后,Kubernetes Deployment 控制器会持续监视这些实例。 如果托管实例的节点关闭或被删除,则 Deployment 控制器会将该实例替换为群集中另一个节点上的实例。 <b>这提供了一种自我修复机制来解决机器故障维护问题。</b></p>

<!-- <p>In a pre-orchestration world, installation scripts would often be used to start applications, but they did not allow recovery from machine failure. By both creating your application instances and keeping them running across Nodes, Kubernetes Deployments provide a fundamentally different approach to application management. </p> -->
<p>在没有 Kubernetes 这种编排系统之前,安装脚本通常用于启动应用程序,但它们不允许从机器故障中恢复。通过创建应用程序实例并使它们在节点之间运行, Kubernetes Deployments 提供了一种与众不同的应用程序管理方法。</p>

</div>

<div class="col-md-4">
<div class="content__box content__box_lined">
<!-- <h3>Summary:</h3> -->
<h3>总结:</h3>
<ul>
<li>Deployments</li>
<li>Kubectl</li>
</ul>
</div>
<div class="content__box content__box_fill">
<!-- <p><i>
A Deployment is responsible for creating and updating instances of your application
</i></p> -->
<p><i>
Deployment 负责创建和更新应用程序的实例
</i></p>
</div>
</div>
</div>
<br>

<div class="row">
<div class="col-md-8">
<!-- <h2 style="color: #3771e3;">Deploying your first app on Kubernetes</h2> -->
<h2 style="color: #3771e3;">部署你在 Kubernetes 上的第一个应用程序</h2>
</div>
</div>

<div class="row">
<div class="col-md-8">
<p><img src="/docs/tutorials/kubernetes-basics/public/images/module_02_first_app.svg"></p>
</div>
</div>
<br>

<div class="row">
<div class="col-md-8">

<!-- <p>You can create and manage a Deployment by using the Kubernetes command line interface, <b>Kubectl</b>. Kubectl uses the Kubernetes API to interact with the cluster. In this module, you'll learn the most common Kubectl commands needed to create Deployments that run your applications on a Kubernetes cluster.</p> -->
<p>您可以使用 Kubernetes 命令行界面创建和管理 Deployment,<b>Kubectl</b>.Kubectl 使用 Kubernetes API 与集群进行交互。在本单元中,您将学习创建在 Kubernetes 集群上运行应用程序的 Deployment 所需的最常见的 Kubectl 命令。</p>

<!-- <p>When you create a Deployment, you'll need to specify the container image for your application and the number of replicas that you want to run. You can change that information later by updating your Deployment; Modules <a href="/docs/tutorials/kubernetes-basics/scale-intro/">5</a> and <a href="/docs/tutorials/kubernetes-basics/update-intro/">6</a> of the bootcamp discuss how you can scale and update your Deployments.</p> -->
<p>创建 Deployment 时,您需要指定应用程序的容器映像以及要运行的副本数。您可以稍后通过更新 Deployment 来更改该信息; 模块 <a href="/docs/tutorials/kubernetes-basics/scale-intro/">5</a><a href="/docs/tutorials/kubernetes-basics/update-intro/">6</a> 讨论了如何扩展和更新 Deployments。</p>

</div>
<div class="col-md-4">
<div class="content__box content__box_fill">
<!-- <p><i> Applications need to be packaged into one of the supported container formats in order to be deployed on Kubernetes </i></p> -->
<p><i> 应用程序需要打包成一种受支持的容器格式,以便部署在 Kubernetes 上 </i></p>
</div>
</div>
</div>

<div class="row">
<div class="col-md-8">

<!-- <p>For our first Deployment, we'll use a Node.js application packaged in a Docker container.
To create the Node.js application and deploy the Docker container, follow the instructions from the
<a href="/docs/tutorials/hello-minikube/">Hello Minikube tutorial</a>.</p>
<p>Now that you know what Deployments are, let's go to the online tutorial and deploy our first app!</p> -->
<p>对于我们的第一次部署,我们将使用打包在 Docker 容器中的 Node.js 应用程序。
要创建 Node.js 应用程序并部署 Docker 容器,请按照
<a href="/docs/tutorials/hello-minikube/">你好 Minikube 教程</a>.</p>

<p>现在您已经了解了 Deployment 的内容,让我们转到在线教程并部署我们的第一个应用程序!</p>
</div>
</div>
<br>

<div class="row">
<div class="col-md-12">
<a class="btn btn-lg btn-success" href="/docs/tutorials/kubernetes-basics/deploy-app/deploy-interactive/" role="button">开始交互式教程 <span class="btn__next"></span></a>
</div>
</div>

</main>

</div>

</body>
</html>

0 comments on commit f444152

Please sign in to comment.