# Kubernetes-The-Hard-Way

翻译注：本部分翻译自 [Kubernetes The Hard Way](https://github.com/kelseyhightower/kubernetes-the-hard-way)，译者 [@kweisamx](https://github.com/kweisamx) 和 [@feiskyer](https://github.com/feiskyer)。该教程指引用户在 [Google Cloud Platform](https://cloud.google.com) 上面一步步搭建一个高可用的 Kubernetes 集群。

如果你正在使用 [Microsoft Azure](https://azure.microsoft.com)，那么请参考 [kubernetes-the-hard-way-on-azure](https://github.com/ivanfioravanti/kubernetes-the-hard-way-on-azure) 在 Azure 上面搭建 Kubernetes 集群。

如有翻译不好的地方或文字上的错误, 欢迎提出 [Issue](https://github.com/feiskyer/kubernetes-handbook) 或是 [PR](https://github.com/feiskyer/kubernetes-handbook)。

本教程将带领你一步步配置和部署一套高可用的 Kubernetes 集群。它不适用于想要一键自动化部署 Kubernetes 集群的人。如果你想要一键自动化部署，请参考 [Google Container Engine](https://cloud.google.com/container-engine) 或 [Getting Started Guides](https://kubernetes.io/docs/setup/)。

Kubernetes The Hard Way 的主要目的是学习, 也就是说它会花很多时间来保障读者可以真正理解搭建 Kubernetes 的每个步骤。

> 使用该教程部署的集群不应该直接视为生产环境可用，并且也可能无法获得 Kubernetes 社区的许多支持，但这都不影响你想真正了解 Kubernetes 的决心！

## 版权

This work is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-nc-sa/4.0/).

## 目标读者

该教程的目标是给那些计划要将 Kubernetes 应用到生产环境的人, 并想了解每个有关 Kubernetes 的环节以及他们如何运作的。

## 集群版本

Kubernetes The Hard Way 将引导你建立高可用的 Kubernetes 集群, 包括每个组件之间的加密以及 RBAC 认证

* [Kubernetes](https://github.com/kubernetes/kubernetes) v1.18.6
* [Containerd Container Runtime](https://github.com/containerd/containerd) v1.3.6
* [CNI Container Networking](https://github.com/containernetworking/cni) v0.8.6
* [etcd](https://github.com/coreos/etcd) v3.4.10
* [CoreDNS](https://github.com/coredns/coredns) v1.7.0

## 实验步骤

这份教程假设你已经创建并配置好了 [Google Cloud Platform](https://cloud.google.com) 账户。该教程只是将 GCP 作为最基础的架构，教程的内容也同样适用于其他的平台。

* [准备部署环境](https://kubernetes.feisky.xyz/setup/k8s-hard-way/01-prerequisites)
* [安装必要工具](https://kubernetes.feisky.xyz/setup/k8s-hard-way/02-client-tools)
* [创建计算资源](https://kubernetes.feisky.xyz/setup/k8s-hard-way/03-compute-resources)
* [配置创建证书](https://kubernetes.feisky.xyz/setup/k8s-hard-way/04-certificate-authority)
* [配置生成配置](https://kubernetes.feisky.xyz/setup/k8s-hard-way/05-kubernetes-configuration-files)
* [配置生成密钥](https://kubernetes.feisky.xyz/setup/k8s-hard-way/06-data-encryption-keys)
* [部署Etcd群集](https://kubernetes.feisky.xyz/setup/k8s-hard-way/07-bootstrapping-etcd)
* [部署控制节点](https://kubernetes.feisky.xyz/setup/k8s-hard-way/08-bootstrapping-kubernetes-controllers)
* [部署计算节点](https://kubernetes.feisky.xyz/setup/k8s-hard-way/09-bootstrapping-kubernetes-workers)
* [配置Kubectl](https://kubernetes.feisky.xyz/setup/k8s-hard-way/10-configuring-kubectl)
* [配置网络路由](https://kubernetes.feisky.xyz/setup/k8s-hard-way/11-pod-network-routes)
* [部署DNS扩展](https://kubernetes.feisky.xyz/setup/k8s-hard-way/12-dns-addon)
* [烟雾测试](https://kubernetes.feisky.xyz/setup/k8s-hard-way/13-smoke-test)
* [删除集群](https://kubernetes.feisky.xyz/setup/k8s-hard-way/14-cleanup)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kubernetes.feisky.xyz/setup/k8s-hard-way.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
