kelseyhightower / kubernetes-the-hard-way
Kubernetes The Hard Way
Kubernetes The Hard Way
This tutorial walks you through setting up Kubernetes the hard way. This guide is not for someone looking for a fully automated tool to bring up a Kubernetes cluster. Kubernetes The Hard Way is optimized for learning, which means taking the long route to ensure you understand each task required to bootstrap a Kubernetes cluster. The results of this tutorial should not be viewed as production ready, and may receive limited support from the community, but don’t let that stop you from learning!
本教程将引导你通过“硬核”方式(The Hard Way)来搭建 Kubernetes。本指南不适合那些寻找全自动工具来部署 Kubernetes 集群的用户。Kubernetes The Hard Way 专为学习而优化,这意味着我们将采取“长途跋涉”的方式,以确保你理解引导 Kubernetes 集群所需的每一项任务。本教程的成果不应被视为生产就绪,且可能只会获得社区有限的支持,但请不要因此而停止学习!
Copyright
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
版权声明
本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。
Target Audience
The target audience for this tutorial is someone who wants to understand the fundamentals of Kubernetes and how the core components fit together.
目标读者
本教程的目标读者是那些想要理解 Kubernetes 基础知识以及核心组件如何协同工作的人。
Cluster Details
Kubernetes The Hard Way guides you through bootstrapping a basic Kubernetes cluster with all control plane components running on a single node, and two worker nodes, which is enough to learn the core concepts.
集群详情
Kubernetes The Hard Way 将引导你引导一个基础的 Kubernetes 集群,其中所有控制平面组件运行在单个节点上,并包含两个工作节点,这足以让你学习核心概念。
Component versions:
- kubernetes v1.32.x
- containerd v2.1.x
- cni v1.6.x
- etcd v3.6.x
组件版本:
- kubernetes v1.32.x
- containerd v2.1.x
- cni v1.6.x
- etcd v3.6.x
Labs
This tutorial requires four (4) ARM64 or AMD64 based virtual or physical machines connected to the same network.
实验环境
本教程需要四 (4) 台基于 ARM64 或 AMD64 架构的虚拟机或物理机,且它们必须连接到同一个网络中。
Prerequisites
- Setting up the Jumpbox
- Provisioning Compute Resources
- Provisioning the CA and Generating TLS Certificates
- Generating Kubernetes Configuration Files for Authentication
- Generating the Data Encryption Config and Key
- Bootstrapping the etcd Cluster
- Bootstrapping the Kubernetes Control Plane
- Bootstrapping the Kubernetes Worker Nodes
- Configuring kubectl for Remote Access
- Provisioning Pod Network Routes
- Smoke Test
- Cleaning Up
先决条件与步骤
- 设置跳转机 (Jumpbox)
- 配置计算资源
- 配置 CA 并生成 TLS 证书
- 生成用于身份验证的 Kubernetes 配置文件
- 生成数据加密配置和密钥
- 引导 etcd 集群
- 引导 Kubernetes 控制平面
- 引导 Kubernetes 工作节点
- 配置 kubectl 以进行远程访问
- 配置 Pod 网络路由
- 冒烟测试
- 清理环境