From 8e3437245f123083a990f3bc792861fcce70a29a Mon Sep 17 00:00:00 2001 From: Qiming Teng Date: Mon, 7 Sep 2020 21:19:52 +0800 Subject: [PATCH] [zh] fix links in setup section (4) --- content/zh/docs/setup/_index.md | 7 +- .../container-runtimes.md | 23 ++- .../production-environment/tools/kops.md | 158 ++++++++---------- .../tools/kubeadm/install-kubeadm.md | 2 +- .../production-environment/turnkey/aws.md | 37 ++-- .../production-environment/turnkey/clc.md | 48 +++--- 6 files changed, 129 insertions(+), 146 deletions(-) diff --git a/content/zh/docs/setup/_index.md b/content/zh/docs/setup/_index.md index 042a75f203..16c58a7b6c 100644 --- a/content/zh/docs/setup/_index.md +++ b/content/zh/docs/setup/_index.md @@ -82,8 +82,8 @@ If you're learning Kubernetes, use the Docker-based solutions: tools supported b |社区 |生态系统 | | ------------ | -------- | -| [Minikube](/docs/setup/learning-environment/minikube/) | [Docker Desktop](https://www.docker.com/products/docker-desktop)| -| [kind (Kubernetes IN Docker)](/docs/setup/learning-environment/kind/) | [Minishift](https://docs.okd.io/latest/minishift/)| +| [Minikube](/zh/docs/setup/learning-environment/minikube/) | [Docker Desktop](https://www.docker.com/products/docker-desktop)| +| [kind (Kubernetes IN Docker)](/zh/docs/setup/learning-environment/kind/) | [Minishift](https://docs.okd.io/latest/minishift/)| | | [MicroK8s](https://microk8s.io/)| @@ -100,4 +100,5 @@ When evaluating a solution for a production environment, consider which aspects -[Kubernetes 合作伙伴](https://kubernetes.io/zh/partners/#kcsp) 包括一个 [已认证的 Kubernetes](https://github.com/cncf/k8s-conformance/#certified-kubernetes) 提供商列表。 +[Kubernetes 合作伙伴](https://kubernetes.io/zh/partners/#kcsp) 包括一个 +[已认证的 Kubernetes](https://github.com/cncf/k8s-conformance/#certified-kubernetes) 提供商列表。 diff --git a/content/zh/docs/setup/production-environment/container-runtimes.md b/content/zh/docs/setup/production-environment/container-runtimes.md index 7be7f189cd..88815ddfd5 100644 --- a/content/zh/docs/setup/production-environment/container-runtimes.md +++ b/content/zh/docs/setup/production-environment/container-runtimes.md @@ -7,17 +7,17 @@ content_type: concept weight: 10 --- + {{< feature-state for_k8s_version="v1.6" state="stable" >}} + -{{< caution >}} +{{< caution >}} 我们发现 runc 在运行容器,处理系统文件描述符时存在一个漏洞。 恶意容器可以利用此漏洞覆盖 runc 二进制文件的内容,并以此在主机系统的容器上运行任意的命令。 @@ -49,20 +47,20 @@ information about the issue. --> ### 适用性 -{{< note >}} +{{< note >}} 本文档是为在 Linux 上安装 CRI 的用户编写的。 -对于其他操作系统,请查找特定于您平台的文档。 +对于其他操作系统,请查找特定于你平台的文档。 {{< /note >}} -您应该以 `root` 身份执行本指南中的所有命令。 +你应该以 `root` 身份执行本指南中的所有命令。 例如,使用 `sudo` 前缀命令,或者成为 `root` 并以该用户身份运行命令。 当某个 Linux 系统发行版使用 systemd 作为其初始化系统时,初始化进程会生成并使用一个 root 控制组 (`cgroup`),并充当 cgroup 管理器。 systemd 与 cgroup 集成紧密,并将为每个进程分配 cgroup。 -您也可以配置容器运行时和 kubelet 使用 `cgroupfs`。 +你也可以配置容器运行时和 kubelet 使用 `cgroupfs`。 连同 systemd 一起使用 `cgroupfs` 意味着将有两个不同的 cgroup 管理器。 ## Docker -在您的每台机器上安装 Docker。 +在你的每台机器上安装 Docker。 推荐安装 19.03.11 版本,但是 1.13.1、17.03、17.06、17.09、18.06 和 18.09 版本也是可以的。 请跟踪 Kubernetes 发行说明中经过验证的 Docker 最新版本变化。 -使用以下命令在您的系统上安装 Docker: +使用以下命令在你的系统上安装 Docker: {{< tabs name="tab-cri-docker-installation" >}} {{% tab name="Ubuntu 16.04+" %}} @@ -866,8 +864,9 @@ Refer to the [Frakti QuickStart guide](https://github.com/kubernetes/frakti#quic systemd_cgroup = true ``` 当使用 kubeadm 时,请手动配置 -[kubelet 的 cgroup 驱动](/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#configure-cgroup-driver-used-by-kubelet-on-master-node) +[kubelet 的 cgroup 驱动](/zh/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#configure-cgroup-driver-used-by-kubelet-on-master-node) ## 其他的 CRI 运行时:frakti 请参阅 [Frakti 快速开始指南](https://github.com/kubernetes/frakti#quickstart) 来获取更多的信息。 + diff --git a/content/zh/docs/setup/production-environment/tools/kops.md b/content/zh/docs/setup/production-environment/tools/kops.md index 99c05d2fbf..86cb3ddf0f 100644 --- a/content/zh/docs/setup/production-environment/tools/kops.md +++ b/content/zh/docs/setup/production-environment/tools/kops.md @@ -4,11 +4,9 @@ content_type: concept weight: 20 --- @@ -44,40 +42,35 @@ kops 是一个自用的供应系统: If your opinions differ from these you may prefer to build your own cluster using [kubeadm](/docs/admin/kubeadm/) as a building block. kops builds on the kubeadm work. --> -如果您有不同的观点,您可能更喜欢使用 [kubeadm](/docs/admin/kubeadm/) 作为构建工具来构建自己的集群。kops 建立在 kubeadm 工作的基础上。 - - +如果你有不同的观点,你可能更喜欢使用 [kubeadm](/zh/docs/reference/setup-tools/kubeadm/) +作为构建工具来构建自己的集群。kops 建立在 kubeadm 工作的基础上。 ## 创建集群 - ### (1/5) 安装 kops - #### 前提条件 - -您必须安装 [kubectl](/docs/tasks/tools/install-kubectl/) 才能使 kops 工作。 +你必须安装 [kubectl](/zh/docs/tasks/tools/install-kubectl/) 才能使 kops 工作。 #### 安装 - 从[下载页面](https://github.com/kubernetes/kops/releases)下载 kops(从源代码构建也很容易): -### (2/5) 为您的集群创建一个 route53 域名 - -kops 在集群内部都使用 DNS 进行发现操作,因此您可以从客户端访问 kubernetes API 服务器。 +### (2/5) 为你的集群创建一个 route53 域名 + +kops 在集群内部都使用 DNS 进行发现操作,因此你可以从客户端访问 kubernetes API 服务器。 -kops 对集群名称有明显的要求:它应该是有效的 DNS 名称。这样一来,您就不会再使集群混乱, +kops 对集群名称有明显的要求:它应该是有效的 DNS 名称。这样一来,你就不会再使集群混乱, 可以与同事明确共享集群,并且无需依赖记住 IP 地址即可访问群集。 -您应该使用子域名来划分集群。作为示例,我们将使用域名 `useast1.dev.example.com`。 +你应该使用子域名来划分集群。作为示例,我们将使用域名 `useast1.dev.example.com`。 然后,API 服务器端点域名将为 `api.useast1.dev.example.com`。 -Route53 托管区域可以服务子域名。您的托管区域可能是 `useast1.dev.example.com`,还有 `dev.example.com` 甚至 `example.com`。 -kops 可以与以上任何一种配合使用,因此通常您出于组织原因选择不同的托管区域。 -例如,允许您在 `dev.example.com` 下创建记录,但不能在 `example.com` 下创建记录。 +Route53 托管区域可以服务子域名。你的托管区域可能是 `useast1.dev.example.com`,还有 `dev.example.com` 甚至 `example.com`。 +kops 可以与以上任何一种配合使用,因此通常你出于组织原因选择不同的托管区域。 +例如,允许你在 `dev.example.com` 下创建记录,但不能在 `example.com` 下创建记录。 -假设您使用 `dev.example.com` 作为托管区域。您可以使用[正常流程](http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/CreatingNewSubdomain.html) 或者使用诸如 `aws route53 create-hosted-zone --name dev.example.com --caller-reference 1` 之类的命令来创建该托管区域。 +假设你使用 `dev.example.com` 作为托管区域。你可以使用 +[正常流程](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/CreatingNewSubdomain.html) +或者使用诸如 `aws route53 create-hosted-zone --name dev.example.com --caller-reference 1` +之类的命令来创建该托管区域。 -然后,您必须在父域名中设置您的 DNS 记录,以便该域名中的记录可以被解析。在这里,您将在 `example.com` 中为 `dev` 创建 DNS 记录。 -如果它是根域名,则可以在域名注册机构配置 DNS 记录。例如,您需要在购买 `example.com` 的地方配置 `example.com`。 +然后,你必须在父域名中设置你的 DNS 记录,以便该域名中的记录可以被解析。 +在这里,你将在 `example.com` 中为 `dev` 创建 DNS 记录。 +如果它是根域名,则可以在域名注册机构配置 DNS 记录。 +例如,你需要在购买 `example.com` 的地方配置 `example.com`。 这一步很容易搞砸(这是问题的第一大原因!) -如果您安装了 dig 工具,则可以通过运行以下步骤再次检查集群是否配置正确: +如果你安装了 dig 工具,则可以通过运行以下步骤再次检查集群是否配置正确: - -`dig DNS dev.example.com` +```shell +dig DNS dev.example.com +``` -您应该看到 Route53 分配了您的托管区域的 4 条 DNS 记录。 +你应该看到 Route53 分配了你的托管区域的 4 条 DNS 记录。 -### (3/5) 创建一个 S3 存储桶来存储集群状态 - -kops 使您即使在安装后也可以管理集群。为此,它必须跟踪已创建的集群及其配置、所使用的密钥等。 +### (3/5) 创建一个 S3 存储桶来存储集群状态 + +kops 使你即使在安装后也可以管理集群。为此,它必须跟踪已创建的集群及其配置、所使用的密钥等。 此信息存储在 S3 存储桶中。S3 权限用于控制对存储桶的访问。 -多个集群可以使用同一 S3 存储桶,并且您可以在管理同一集群的同事之间共享一个 S3 存储桶 - 这比传递 kubecfg 文件容易得多。 -但是有权访问 S3 存储桶的任何人都将拥有对所有集群的管理访问权限,因此您不想在运营团队之外共享它。 +多个集群可以使用同一 S3 存储桶,并且你可以在管理同一集群的同事之间共享一个 S3 存储桶 - 这比传递 kubecfg 文件容易得多。 +但是有权访问 S3 存储桶的任何人都将拥有对所有集群的管理访问权限,因此你不想在运营团队之外共享它。 -* 导出 `AWS_PROFILE` 文件(如果您需要选择一个配置文件用来使 AWS CLI 正常工作) - - -* 使用 `aws s3 mb s3://clusters.dev.example.com` 创建 S3 存储桶 - - -* 您可以进行 `export KOPS_STATE_STORE=s3://clusters.dev.example.com` 操作,然后 kops 将默认使用此位置。 - 我们建议将其放入您的 bash profile 文件或类似文件中。 - +* 导出 `AWS_PROFILE` 文件(如果你需要选择一个配置文件用来使 AWS CLI 正常工作) +* 使用 `aws s3 mb s3://clusters.dev.example.com` 创建 S3 存储桶 +* 你可以进行 `export KOPS_STATE_STORE=s3://clusters.dev.example.com` 操作,然后 kops 将默认使用此位置。 + 我们建议将其放入你的 bash profile 文件或类似文件中。 -### (4/5) 建立您的集群配置 - -运行 "kops create cluster" 以创建您的集群配置: +### (4/5) 建立你的集群配置 + +运行 "kops create cluster" 以创建你的集群配置: `kops create cluster --zones=us-east-1c useast1.dev.example.com` @@ -242,8 +229,8 @@ kops will create the configuration for your cluster. Note that it _only_ create not actually create the cloud resources - you'll do that in the next step with a `kops update cluster`. This give you an opportunity to review the configuration or change it. --> -kops 将为您的集群创建配置。请注意,它_仅_创建配置,实际上并没有创建云资源 - 您将在下一步中使用 `kops update cluster` 进行配置。 -这使您有机会查看配置或进行更改。 +kops 将为你的集群创建配置。请注意,它_仅_创建配置,实际上并没有创建云资源 - 你将在下一步中使用 `kops update cluster` 进行配置。 +这使你有机会查看配置或进行更改。 * 使用以下命令列出集群:`kops get cluster` * 使用以下命令编辑该集群:`kops edit cluster useast1.dev.example.com` -* 使用以下命令编辑您的节点实例组:`kops edit ig --name = useast1.dev.example.com nodes` -* 使用以下命令编辑您的主实例组:`kops edit ig --name = useast1.dev.example.com master-us-east-1c` +* 使用以下命令编辑你的节点实例组:`kops edit ig --name = useast1.dev.example.com nodes` +* 使用以下命令编辑你的主实例组:`kops edit ig --name = useast1.dev.example.com master-us-east-1c` -如果这是您第一次使用 kops,请花几分钟尝试一下! 实例组是一组实例,将被注册为 kubernetes 节点。 -在 AWS 上,这是通过 auto-scaling-groups 实现的。您可以有多个实例组,例如,如果您想要的是混合实例和按需实例的节点,或者 - GPU 和非 GPU 实例。 +如果这是你第一次使用 kops,请花几分钟尝试一下! 实例组是一组实例,将被注册为 kubernetes 节点。 +在 AWS 上,这是通过 auto-scaling-groups 实现的。你可以有多个实例组。 +例如,如果你想要的是混合实例和按需实例的节点,或者 GPU 和非 GPU 实例。 ### (5/5) 在 AWS 中创建集群 - 运行 "kops update cluster" 以在 AWS 中创建集群: -`kops update cluster useast1.dev.example.com --yes` +```shell +kops update cluster useast1.dev.example.com --yes +``` -这需要几秒钟的时间才能运行,但实际上集群可能需要几分钟才能准备就绪。每当更改集群配置时,都会使用 `kops update cluster` 工具。 -它将对配置进行的更改应用于您的集群 - 根据需要重新配置 AWS 或者 kubernetes。 +这需要几秒钟的时间才能运行,但实际上集群可能需要几分钟才能准备就绪。 +每当更改集群配置时,都会使用 `kops update cluster` 工具。 +它将对配置进行的更改应用于你的集群 - 根据需要重新配置 AWS 或者 kubernetes。 -例如,在您运行 `kops edit ig nodes` 之后,然后运行 `kops update cluster --yes` 应用您的配置,有时您还必须运行 `kops rolling-update cluster` 立即回滚更新配置。 +例如,在你运行 `kops edit ig nodes` 之后,然后运行 `kops update cluster --yes` +应用你的配置,有时你还必须运行 `kops rolling-update cluster` 立即回滚更新配置。 -如果没有 `--yes` 参数,`kops update cluster` 操作将向您显示其操作的预览效果。这对于生产集群很方便! +如果没有 `--yes` 参数,`kops update cluster` 操作将向你显示其操作的预览效果。这对于生产集群很方便! ### 探索其他附加组件 - -请参阅[附加组件列表](/docs/concepts/cluster-administration/addons/)探索其他附加组件,包括用于 Kubernetes 集群的日志记录、监视、网络策略、可视化和控制的工具。 +请参阅[附加组件列表](/zh/docs/concepts/cluster-administration/addons/)探索其他附加组件, +包括用于 Kubernetes 集群的日志记录、监视、网络策略、可视化和控制的工具。 ## 清理 - * 删除集群:`kops delete cluster useast1.dev.example.com --yes` -* Slack Channel: [#kops-users](https://kubernetes.slack.com/messages/kops-users/) +* Slack 频道: [#kops-users](https://kubernetes.slack.com/messages/kops-users/) * [GitHub Issues](https://github.com/kubernetes/kops/issues) - - ## {{% heading "whatsnext" %}} - -* 了解有关 Kubernetes 的 [concepts](/docs/concepts/) 和 [`kubectl`](/docs/user-guide/kubectl-overview/) 的更多信息。 +* 了解有关 Kubernetes 的[概念](/zh/docs/concepts/) 和 + [`kubectl`](/zh/docs/reference/kubectl/overview/) 的更多信息。 * 了解 `kops` [高级用法](https://github.com/kubernetes/kops)。 * 请参阅 `kops` [文档](https://github.com/kubernetes/kops) 获取教程、最佳做法和高级配置选项。 - diff --git a/content/zh/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md b/content/zh/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md index 9922918718..095f15875e 100644 --- a/content/zh/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md +++ b/content/zh/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md @@ -471,7 +471,7 @@ The automatic detection of cgroup driver for other container runtimes like CRI-O and containerd is work in progress. --> -## 在控制平面节点上配置 kubelet 使用的 cgroup 驱动程序 +## 在控制平面节点上配置 kubelet 使用的 cgroup 驱动程序 {#configure-cgroup-driver-used-by-kubelet-on-master-node} 使用 docker 时,kubeadm 会自动为其检测 cgroup 驱动并在运行时对 `/var/lib/kubelet/kubeadm-flags.env` 文件进行配置。 diff --git a/content/zh/docs/setup/production-environment/turnkey/aws.md b/content/zh/docs/setup/production-environment/turnkey/aws.md index 64bff1dab9..3b97c77bb7 100644 --- a/content/zh/docs/setup/production-environment/turnkey/aws.md +++ b/content/zh/docs/setup/production-environment/turnkey/aws.md @@ -1,21 +1,15 @@ --- -reviewers: -- justinsb -- clove title: 在 AWS EC2 上运行 Kubernetes content_type: task --- - 本页面介绍了如何在 AWS 上安装 Kubernetes 集群。 - - ## {{% heading "prerequisites" %}} -在 AWS 上创建 Kubernetes 集群,您将需要 AWS 的 Access Key ID 和 Secret Access Key。 +在 AWS 上创建 Kubernetes 集群,你将需要 AWS 的 Access Key ID 和 Secret Access Key。 -* [conjure-up](/docs/getting-started-guides/ubuntu/) 是 Kubernetes 的开源安装程序,可在 Ubuntu 上创建与原生 AWS 集成的 Kubernetes 集群。 +* [conjure-up](/zh/docs/setup/) 是 Kubernetes 的开源安装程序,可在 Ubuntu 上创建与原生 AWS 集成的 Kubernetes 集群。 -集群启动脚本将在您的工作站上为您提供一个 `kubernetes` 目录。 -或者,您可以从[此页面](https://github.com/kubernetes/kubernetes/releases)下载最新的 Kubernetes 版本。 +集群启动脚本将在你的工作站上为你提供一个 `kubernetes` 目录。 +或者,你可以从[此页面](https://github.com/kubernetes/kubernetes/releases)下载最新的 Kubernetes 版本。 -接下来,将适当的二进制文件夹添加到您的 `PATH` 以访问 kubectl: +接下来,将适当的二进制文件夹添加到你的 `PATH` 以访问 kubectl: ```shell # macOS @@ -96,10 +88,10 @@ An up-to-date documentation page for this tool is available here: [kubectl manua By default, `kubectl` will use the `kubeconfig` file generated during the cluster startup for authenticating against the API. For more information, please read [kubeconfig files](/docs/tasks/access-application-cluster/configure-access-multiple-clusters/) --> -此工具的最新文档页面位于此处:[kubectl 手册](/docs/user-guide/kubectl/) +此工具的最新文档页面位于此处:[kubectl 手册](/zh/docs/reference/kubectl/kubectl/) 默认情况下,`kubectl` 将使用在集群启动期间生成的 `kubeconfig` 文件对 API 进行身份验证。 -有关更多信息,请阅读 [kubeconfig 文件](/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)。 +有关更多信息,请阅读 [kubeconfig 文件](/zh/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)。 ### 示例 -请参阅[一个简单的 nginx 示例](/docs/tasks/run-application/run-stateless-application-deployment/)试用您的新集群。 +请参阅[一个简单的 nginx 示例](/zh/docs/tasks/run-application/run-stateless-application-deployment/)试用你的新集群。 “Guestbook” 应用程序是另一个入门 Kubernetes 的流行示例:[guestbook 示例](https://github.com/kubernetes/examples/tree/{{< param "githubbranch" >}}/guestbook/)。 @@ -125,7 +117,9 @@ Adding and removing nodes through `kubectl` is not supported. You can still scal --> ## 集群伸缩 -不支持通过 `kubectl` 添加和删除节点。您仍然可以通过调整在安装过程中创建的 [Auto Scaling Group](http://docs.aws.amazon.com/autoscaling/latest/userguide/as-manual-scaling.html) 中的 “Desired” 和 “Max” 属性来手动伸缩节点数量。 +不支持通过 `kubectl` 添加和删除节点。你仍然可以通过调整在安装过程中创建的 +[Auto Scaling Group](https://docs.aws.amazon.com/autoscaling/latest/userguide/as-manual-scaling.html) +中的 “Desired” 和 “Max” 属性来手动伸缩节点数量。 ## 集群拆除 -确保您用于配置集群的环境变量已被导出,然后在运行如下在 Kubernetes 目录的脚本: +确保你用于配置集群的环境变量已被导出,然后在运行如下在 Kubernetes 目录的脚本: ```shell cluster/kube-down.sh @@ -156,8 +150,8 @@ AWS | KubeOne | Ubuntu, CoreOS, CentOS | canal, weave IaaS 提供商 | 配置管理 | 操作系统 | 网络 | 文档 | 符合率 | 支持等级 -------------------- | ------------ | ------------- | ---------- | --------------------------------------------- | ---------| ---------------------------- AWS | kops | Debian | k8s (VPC) | [docs](https://github.com/kubernetes/kops) | | Community ([@justinsb](https://github.com/justinsb)) -AWS | CoreOS | CoreOS | flannel | [docs](/docs/getting-started-guides/aws) | | Community -AWS | Juju | Ubuntu | flannel, calico, canal | [docs](/docs/getting-started-guides/ubuntu) | 100% | Commercial, Community +AWS | CoreOS | CoreOS | flannel | [docs](/zh/docs/setup/) | | Community +AWS | Juju | Ubuntu | flannel, calico, canal | [docs](/zh/docs/setup/) | 100% | Commercial, Community AWS | KubeOne | Ubuntu, CoreOS, CentOS | canal, weavenet | [docs](https://github.com/kubermatic/kubeone) | 100% | Commercial, Community ## 进一步阅读 -请参阅 [Kubernetes 文档](/docs/)了解有关管理和使用 Kubernetes 集群的更多详细信息。 - +请参阅 [Kubernetes 文档](/zh/docs/)了解有关管理和使用 Kubernetes 集群的更多详细信息。 diff --git a/content/zh/docs/setup/production-environment/turnkey/clc.md b/content/zh/docs/setup/production-environment/turnkey/clc.md index 6be7d06157..cba761aab6 100644 --- a/content/zh/docs/setup/production-environment/turnkey/clc.md +++ b/content/zh/docs/setup/production-environment/turnkey/clc.md @@ -2,12 +2,9 @@ title: 在 CenturyLink Cloud 上运行 Kubernetes --- - 这些脚本适用于在 CenturyLink Cloud 上创建、删除和扩展 Kubernetes 集群。 -您可以使用单个命令完成所有任务。我们提供了用于执行这些任务的 Ansible 手册 [点击这里](https://github.com/CenturyLinkCloud/adm-kubernetes-on-clc/blob/master/ansible/README.md) +你可以使用单个命令完成所有任务。我们提供了用于执行这些任务的 +[Ansible 手册](https://github.com/CenturyLinkCloud/adm-kubernetes-on-clc/blob/master/ansible/README.md) -3)从模板创建凭证文件,并使用它来设置您的 ENV 变量 +3)从模板创建凭证文件,并使用它来设置你的 ENV 变量 ```shell cp ansible/credentials.sh.template ansible/credentials.sh @@ -117,7 +115,7 @@ source ansible/credentials.sh -4)使用内网的虚拟机或 [ 配置与 CenturyLink Cloud 网络的 VPN 连接.](https://www.ctl.io/knowledge-base/network/how-to-configure-client-vpn/) 授予您的计算机对 CenturyLink Cloud 网络的访问权限。 +4)使用内网的虚拟机或 [ 配置与 CenturyLink Cloud 网络的 VPN 连接.](https://www.ctl.io/knowledge-base/network/how-to-configure-client-vpn/) 授予你的计算机对 CenturyLink Cloud 网络的访问权限。 #### 脚本安装示例:Ubuntu 14 演练 -如果您使用 Ubuntu 14,为方便起见,我们会提供分步指导帮助安装必备条件和脚本。 +如果你使用 Ubuntu 14,为方便起见,我们会提供分步指导帮助安装必备条件和脚本。 ```shell # system @@ -174,7 +172,7 @@ point to the new cluster. When the cluster creation is complete, the configuration files for it are stored locally on your administrative host, in the following directory ---> -创建集群大约需要15分钟。脚本完成后,它将输出一些命令,这些命令将帮助您在计算机上设置 kubectl 以指向新集群。 +创建集群大约需要15分钟。脚本完成后,它将输出一些命令,这些命令将帮助你在计算机上设置 kubectl 以指向新集群。 完成集群创建后,其配置文件会存储在本地管理主机的以下目录中 @@ -323,7 +321,7 @@ We configure the Kubernetes cluster with the following features: * Heapster / InfluxDB:用于指标收集,是 Grafana 和 auto-scaling 需要的。 * Grafana:Kubernetes/Docker 指标仪表板 * KubeUI:用于查看 Kubernetes 状态的简单 Web 界面 -* Kube 仪表板:新的 Web 界面可与您的集群进行交互 +* Kube 仪表板:新的 Web 界面可与你的集群进行交互 ## 管理集群 -管理 Kubernetes 集群最常用工具是 command-line 实用程序 ```kubectl```。如果您的管理器上还没有此二进制文件的副本,可以运行脚本 ```install_kubectl.sh```,它将下载该脚本并将其安装在 ```/usr/bin/local``` 中。 +管理 Kubernetes 集群最常用工具是 command-line 实用程序 ```kubectl```。如果你的管理器上还没有此二进制文件的副本,可以运行脚本 ```install_kubectl.sh```,它将下载该脚本并将其安装在 ```/usr/bin/local``` 中。 ### 以编程方式访问集群 -可以使用本地存储的客户端证书来访问 apiserver。例如,您可以使用 [Kubernetes API 客户端库](/docs/reference/using-api/client-libraries/) 选择编程语言对 Kubernetes 集群进行编程。 +可以使用本地存储的客户端证书来访问 apiserver。例如,你可以使用 +[Kubernetes API 客户端库](/zh/docs/reference/using-api/client-libraries/) 选择编程语言对 Kubernetes 集群进行编程。 为了演示如何使用这些本地存储的证书,我们提供以下示例,使用 ```curl``` 通过 https 与主 apiserver 进行通信: @@ -410,9 +409,14 @@ kubernetes-dashboard is running at ```https://${MASTER_IP}:6443/api/v1/namespace ---> ### 使用浏览器访问集群 -安装 [Kubernetes 仪表板](/docs/tasks/web-ui-dashboard/)。创建集群时,脚本会为这些接口输出 URL,如下所示: +安装 [Kubernetes 仪表板](/zh/docs/tasks/access-application-cluster/web-ui-dashboard/)。 +创建集群时,脚本会为这些接口输出 URL,如下所示: -kubernetes-dashboard 在以下位置运行 ```https://${MASTER_IP}:6443/api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxy``` +kubernetes-dashboard 在以下位置运行 + +``` +https://${MASTER_IP}:6443/api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxy +``` 对 UI 进行身份验证的注意事项: -群集设置为对用户 _admin_ 使用基本的身份验证。进入 URL ```https://${MASTER_IP}:6443``` 获取从 apiserver 上接收的自签名证书,然后出示管理员密码并写入文件 ```> _${CLC_CLUSTER_HOME}/kube/admin_password.txt_``` +集群设置为对用户 _admin_ 使用基本的身份验证。进入 URL ```https://${MASTER_IP}:6443``` 获取从 apiserver 上接收的自签名证书,然后出示管理员密码并写入文件 ```> _${CLC_CLUSTER_HOME}/kube/admin_password.txt_``` ### 配置文件 -多个配置文件被写入几个子目录,子目录在 ```.clc_kube/${CLC_CLUSTER_NAME}``` 下的主目录 *CLC_CLUSTER_HOME* 中。使用这些文件可以从创建群集的计算机之外的其他计算机访问群集。 +多个配置文件被写入几个子目录,子目录在 ```.clc_kube/${CLC_CLUSTER_NAME}``` 下的主目录 *CLC_CLUSTER_HOME* 中。使用这些文件可以从创建集群的计算机之外的其他计算机访问集群。 -Kubernetes API 服务器在 Web URL 上公开服务,这些 URL 受客户端证书的保护。如果您在本地运行 kubectl 代理,```kubectl``` 将提供必要的证书,并通过 http 在本地提供服务。 +Kubernetes API 服务器在 Web URL 上公开服务,这些 URL 受客户端证书的保护。如果你在本地运行 kubectl 代理,```kubectl``` 将提供必要的证书,并通过 http 在本地提供服务。 ```shell kubectl proxy -p 8001 @@ -486,7 +490,7 @@ kubectl proxy -p 8001 -然后,您可以访问 ```http://127.0.0.1:8001/api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxy/``` 之类的 URL,不再需要浏览器中的客户端证书 。 +然后,你可以访问 ```http://127.0.0.1:8001/api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxy/``` 之类的 URL,不再需要浏览器中的客户端证书 。 ## Ansible 文件 -如果您想了解有关 Ansible 文件的更多信息,请 [浏览此文件](https://github.com/CenturyLinkCloud/adm-kubernetes-on-clc/blob/master/ansible/README.md) +如果你想了解有关 Ansible 文件的更多信息,请 [浏览此文件](https://github.com/CenturyLinkCloud/adm-kubernetes-on-clc/blob/master/ansible/README.md) ## 更多 -有关管理和使用 Kubernetes 集群的更多详细信息,请参见 [Kubernetes 文档](/docs/) +有关管理和使用 Kubernetes 集群的更多详细信息,请参见 [Kubernetes 文档](/zh/docs/)