Switch language name 'zh' to 'zh-cn'

This is the first step to rename 'zh' to 'zh-cn'. There are several reasons why we rename the language name.

- The upstream docsy theme changed the language name, leading to many warnings during site build;
  The side-effect is that the i18n strings are no longer working.
- We believe renaming the language is the right thing to do, because this move can make room for other variants of Chinese language, such as 'zh-tw', 'zh-sg' etc.

There would be several follow-ups to this PR, such as fixing the intra-site links, adding redirects etc.

We will lock up changes to zh/zh-cn pages for the moment, until this one gets in.

This PR is based on commit cdad0a7342.
This commit is contained in:
Qiming Teng
2022-06-10 20:25:27 +08:00
parent 3d345b1816
commit c52818c03d
1347 changed files with 8 additions and 6 deletions
@@ -0,0 +1,4 @@
---
title: 了解你的应用
weight: 30
---
@@ -0,0 +1,54 @@
---
title: 交互式教程-了解你的应用
weight: 20
---
<!--
---
title: Interactive Tutorial - Exploring Your App
weight: 20
---
-->
<!DOCTYPE html>
<html lang="zh">
<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/4" data-katacoda-color="326de6" data-katacoda-secondary="273d6d" data-katacoda-hideintro="false" 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="/zh/docs/tutorials/kubernetes-basics/expose/expose-intro/" role="button">继续阅读第4单元<span class="btn__next"></span></a>
</div>
</div>
</main>
</div>
</body>
</html>
@@ -0,0 +1,222 @@
---
title: 查看 pod 和工作节点
weight: 10
---
<!DOCTYPE html>
<html lang="zh">
<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 Kubernetes Pods.</li>
<li>Learn about Kubernetes Nodes.</li>
<li>Troubleshoot deployed applications.</li>
-->
<li>了解 Kubernetes Pod。</li>
<li>了解 Kubernetes 工作节点。</li>
<li>对已部署的应用故障排除。</li>
</ul>
</div>
<div class="col-md-8">
<!--
<h2>Kubernetes Pods</h2>
-->
<h2>Kubernetes Pods</h2>
<!--
<p>When you created a Deployment in Module <a href="/docs/tutorials/kubernetes-basics/deploy-intro/">2</a>, Kubernetes created a <b>Pod</b> to host your application instance. A Pod is a Kubernetes abstraction that represents a group of one or more application containers (such as Docker), and some shared resources for those containers. Those resources include:</p>
-->
<p>在模块 <a href="/zh/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro/">2</a>创建 Deployment 时, Kubernetes 添加了一个 <b>Pod</b> 来托管你的应用实例。Pod 是 Kubernetes 抽象出来的,表示一组一个或多个应用程序容器(如 Docker),以及这些容器的一些共享资源。这些资源包括:</p>
<!--
<ul>
<li>Shared storage, as Volumes</li>
<li>Networking, as a unique cluster IP address</li>
<li>Information about how to run each container, such as the container image version or specific ports to use</li>
</ul>
-->
<ul>
<li>共享存储,当作卷</li>
<li>网络,作为唯一的集群 IP 地址</li>
<li>有关每个容器如何运行的信息,例如容器映像版本或要使用的特定端口。</li>
</ul>
<!--
<p>A Pod models an application-specific "logical host" and can contain different application containers which are relatively tightly coupled. For example, a Pod might include both the container with your Node.js app as well as a different container that feeds the data to be published by the Node.js webserver. The containers in a Pod share an IP Address and port space, are always co-located and co-scheduled, and run in a shared context on the same Node.</p>
-->
<p>Pod 为特定于应用程序的“逻辑主机”建模,并且可以包含相对紧耦合的不同应用容器。例如,Pod 可能既包含带有 Node.js 应用的容器,也包含另一个不同的容器,用于提供 Node.js 网络服务器要发布的数据。Pod 中的容器共享 IP 地址和端口,始终位于同一位置并且共同调度,并在同一工作节点上的共享上下文中运行。</p>
<!--
<p>Pods are the atomic unit on the Kubernetes platform. When we create a Deployment on Kubernetes, that Deployment creates Pods with containers inside them (as opposed to creating containers directly). Each Pod is tied to the Node where it is scheduled, and remains there until termination (according to restart policy) or deletion. In case of a Node failure, identical Pods are scheduled on other available Nodes in the cluster.</p>
-->
<p>Pod是 Kubernetes 平台上的原子单元。 当我们在 Kubernetes 上创建 Deployment 时,该 Deployment 会在其中创建包含容器的 Pod (而不是直接创建容器)。每个 Pod 都与调度它的工作节点绑定,并保持在那里直到终止(根据重启策略)或删除。 如果工作节点发生故障,则会在集群中的其他可用工作节点上调度相同的 Pod。</p>
</div>
<div class="col-md-4">
<div class="content__box content__box_lined">
<!--
<h3>Summary:</h3>
-->
<h3>总结:</h3>
<ul>
<li>Pods</li>
<li>工作节点</li>
<!--
<li>Kubectl main commands</li>
-->
<li>Kubectl 主要命令</li>
</ul>
</div>
<div class="content__box content__box_fill">
<!--
<p><i>
A Pod is a group of one or more application containers (such as Docker) and includes shared storage (volumes), IP address and information about how to run them.
</i></p>
-->
<p><i>
Pod 是一组一个或多个应用程序容器(例如 Docker),包括共享存储(卷), IP 地址和有关如何运行它们的信息。
</i></p>
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-md-8">
<!--
<h2 style="color: #3771e3;">Pods overview</h2>
-->
<h2 style="color: #3771e3;">Pod 概览</h2>
</div>
</div>
<div class="row">
<div class="col-md-8">
<p><img src="/docs/tutorials/kubernetes-basics/public/images/module_03_pods.svg"></p>
</div>
</div>
<br>
<div class="row">
<div class="col-md-8">
<!--
<h2>Nodes</h2>
<p>A Pod always runs on a <b>Node</b>. A Node is a worker machine in Kubernetes and may be either a virtual or a physical machine, depending on the cluster. Each Node is managed by the Master. A Node can have multiple pods, and the Kubernetes master automatically handles scheduling the pods across the Nodes in the cluster. The Master's automatic scheduling takes into account the available resources on each Node.</p>
<p>Every Kubernetes Node runs at least:</p>
<ul>
<li>Kubelet, a process responsible for communication between the Kubernetes Master and the Node; it manages the Pods and the containers running on a machine.</li>
<li>A container runtime (like Docker) responsible for pulling the container image from a registry, unpacking the container, and running the application.</li>
</ul>
-->
<h2>工作节点</h2>
<p>一个 pod 总是运行在 <b>工作节点</b>。工作节点是 Kubernetes 中的参与计算的机器,可以是虚拟机或物理计算机,具体取决于集群。每个工作节点由主节点管理。工作节点可以有多个 pod ,Kubernetes 主节点会自动处理在集群中的工作节点上调度 pod 。 主节点的自动调度考量了每个工作节点上的可用资源。</p>
<p>每个 Kubernetes 工作节点至少运行:</p>
<ul>
<li>Kubelet,负责 Kubernetes 主节点和工作节点之间通信的过程; 它管理 Pod 和机器上运行的容器。</li>
<li>容器运行时(如 Docker)负责从仓库中提取容器镜像,解压缩容器以及运行应用程序。</li>
</ul>
</div>
<div class="col-md-4">
<div class="content__box content__box_fill">
<!--
<p><i> Containers should only be scheduled together in a single Pod if they are tightly coupled and need to share resources such as disk. </i></p>
-->
<p><i>如果它们紧耦合并且需要共享磁盘等资源,这些容器应在一个 Pod 中编排。</i></p>
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-md-8">
<!--
<h2 style="color: #3771e3;">Node overview</h2>
-->
<h2 style="color: #3771e3;">工作节点概览</h2>
</div>
</div>
<div class="row">
<div class="col-md-8">
<p><img src="/docs/tutorials/kubernetes-basics/public/images/module_03_nodes.svg"></p>
</div>
</div>
<br>
<div class="row">
<div class="col-md-8">
<!--
<h2>Troubleshooting with kubectl</h2>
-->
<h2>使用 kubectl 进行故障排除</h2>
<!--
<p>In Module <a href="/docs/tutorials/kubernetes-basics/deploy/deploy-intro/">2</a>, you used Kubectl command-line interface. You'll continue to use it in Module 3 to get information about deployed applications and their environments. The most common operations can be done with the following kubectl commands:</p>
-->
<p>在模块 <a href="/zh/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro/">2</a>,你使用了 Kubectl 命令行界面。 你将继续在第3单元中使用它来获取有关已部署的应用程序及其环境的信息。 最常见的操作可以使用以下 kubectl 命令完成:</p>
<!--
<ul>
<li><b>kubectl get</b> - list resources</li>
<li><b>kubectl describe</b> - show detailed information about a resource</li>
<li><b>kubectl logs</b> - print the logs from a container in a pod</li>
<li><b>kubectl exec</b> - execute a command on a container in a pod</li>
</ul>
-->
<ul>
<li><b>kubectl get</b> - 列出资源</li>
<li><b>kubectl describe</b> - 显示有关资源的详细信息</li>
<li><b>kubectl logs</b> - 打印 pod 和其中容器的日志</li>
<li><b>kubectl exec</b> - 在 pod 中的容器上执行命令</li>
</ul>
<!--
<p>You can use these commands to see when applications were deployed, what their current statuses are, where they are running and what their configurations are.</p>
-->
<p>你可以使用这些命令查看应用程序的部署时间,当前状态,运行位置以及配置。</p>
<!--
<p>Now that we know more about our cluster components and the command line, let's explore our application.</p>
-->
<p>现在我们了解了有关集群组件和命令行的更多信息,让我们来探索一下我们的应用程序。</p>
</div>
<div class="col-md-4">
<div class="content__box content__box_fill">
<!--
<p><i> A node is a worker machine in Kubernetes and may be a VM or physical machine, depending on the cluster. Multiple Pods can run on one Node. </i></p>
-->
<p><i>工作节点是 Kubernetes 中的负责计算的机器,可能是VM或物理计算机,具体取决于集群。多个 Pod 可以在一个工作节点上运行。 </i></p>
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-md-12">
<!--
<a class="btn btn-lg btn-success" href="/docs/tutorials/kubernetes-basics/explore/explore-interactive/" role="button">Start Interactive Tutorial <span class="btn__next"></span></a>
-->
<a class="btn btn-lg btn-success" href="/zh/docs/tutorials/kubernetes-basics/explore/explore-interactive/" role="button"> 开始交互式教程 <span class="btn__next"></span></a>
</div>
</div>
</main>
</div>
</body>
</html>