基于 Kubernetes v1.32
Unit 1:入门篇
Chapter 1.1 Kubernetes 是什么:容器编排的起点
- Section 1.1.1 什么是 Kubernetes:从容器到容器编排
- Section 1.1.2 Kubernetes 主要解决了哪些问题
- Section 1.1.3 Kubernetes 的核心设计理念:声明式、控制循环与可扩展性
- Section 1.1.4 Kubernetes 在云原生体系中的位置
Chapter 1.2 Kubernetes 架构概览:控制平面与数据平面
- Section 1.2.1 控制平面的核心组件:API Server、etcd、Scheduler、Controller Manager
- Section 1.2.2 数据平面的核心组件:kubelet、容器运行时与 kube-proxy
- Section 1.2.3 控制平面与数据平面的职责边界
- Section 1.2.4 一个对象从提交到生效的完整链路
Chapter 1.3 快速上手:搭建本地实验环境
- Section 1.3.1 为什么选择 kind 或 minikube
- Section 1.3.2 使用 kind 快速创建本地集群
- Section 1.3.3 使用 minikube 快速创建本地集群
- Section 1.3.4 kubectl 基本配置与常用命令
Chapter 1.4 第一个 Pod:从 YAML 到运行
- Section 1.4.1 编写第一个 Pod 清单文件
- Section 1.4.2 创建、查看与删除 Pod
- Section 1.4.3 使用 logs、exec、describe 观察 Pod
- Section 1.4.4 理解 Pod 生命周期的基本状态
Unit 2:核心对象篇
Chapter 2.1 Pod 详解:最小调度单元
- Section 2.1.1 Pod 的本质与设计初衷
- Section 2.1.2 Pod 中的一个或多个容器如何协作
- Section 2.1.3 Init Container、Sidecar 与生命周期钩子
- Section 2.1.4 Probe 机制:Liveness、Readiness、Startup
- Section 2.1.5 Pod 常见状态与重启策略
Chapter 2.2 Deployment 与 ReplicaSet:无状态应用管理
- Section 2.2.1 为什么需要 ReplicaSet 与 Deployment
- Section 2.2.2 Deployment 的副本控制与滚动更新
- Section 2.2.3 回滚、暂停与恢复发布
- Section 2.2.4 版本发布策略与常见注意事项
Chapter 2.3 Service 与服务发现:让应用稳定被访问
- Section 2.3.1 为什么 Pod IP 不适合直接访问
- Section 2.3.2 Service 的类型:ClusterIP、NodePort、LoadBalancer、ExternalName
- Section 2.3.3 Service 与 EndpointSlice 的关系
- Section 2.3.4 集群内 DNS 与服务发现机制
Chapter 2.4 ConfigMap 与 Secret:配置与敏感信息管理
- Section 2.4.1 为什么配置需要与镜像解耦
- Section 2.4.2 ConfigMap 的创建与注入方式
- Section 2.4.3 Secret 的创建、挂载与环境变量注入
- Section 2.4.4 配置更新对工作负载的影响与最佳实践
Chapter 2.5 Namespace 与资源隔离:多环境与多团队基础
- Section 2.5.1 Namespace 的作用与适用场景
- Section 2.5.2 默认命名空间与自定义命名空间
- Section 2.5.3 通过命名空间组织环境、团队与应用
- Section 2.5.4 Namespace 与配额、权限的关系
Unit 3:调度与资源管理篇
Chapter 3.1 调度器原理:Pod 为什么会落到这台节点
- Section 3.1.1 调度流程概览:过滤与打分
- Section 3.1.2 调度器如何选择最合适的节点
- Section 3.1.3 常见调度失败原因分析
- Section 3.1.4 默认调度与自定义调度思路
Chapter 3.2 Resource Request / Limit 与 QoS
- Section 3.2.1 Request 与 Limit 的含义与区别
- Section 3.2.2 CPU 与内存资源如何被调度与限制
- Section 3.2.3 QoS 分类:Guaranteed、Burstable、BestEffort
- Section 3.2.4 OOM、驱逐与资源配置误区
Chapter 3.3 亲和性调度与污点容忍
- Section 3.3.1 NodeSelector 与 Node Affinity
- Section 3.3.2 Pod Affinity 与 Pod Anti-Affinity
- Section 3.3.3 Taint 与 Toleration 的工作机制
- Section 3.3.4 典型场景:专用节点、隔离节点与高可用部署
Chapter 3.4 PriorityClass 与 ResourceQuota
- Section 3.4.1 PriorityClass 如何影响调度优先级
- Section 3.4.2 抢占机制与高优先级工作负载
- Section 3.4.3 ResourceQuota 与 LimitRange 的作用
- Section 3.4.4 多团队共享集群时的资源治理思路
Unit 4:网络篇
Chapter 4.1 Kubernetes 网络模型
- Section 4.1.1 每个 Pod 都有独立 IP 的含义
- Section 4.1.2 Pod 与 Pod、Pod 与 Service 的通信路径
- Section 4.1.3 容器网络命名空间与虚拟网络基础
- Section 4.1.4 理解“跨节点通信为什么可行”
Chapter 4.2 CNI 插件选型
- Section 4.2.1 CNI 是什么:Kubernetes 为什么依赖 CNI
- Section 4.2.2 常见 CNI:Calico、Flannel、Cilium 的特点对比
- Section 4.2.3 Overlay 与 Underlay 网络方案差异
- Section 4.2.4 不同场景下的插件选型建议
Chapter 4.3 Service 实现原理:iptables 与 IPVS
- Section 4.3.1 kube-proxy 的职责与工作方式
- Section 4.3.2 iptables 模式的转发原理
- Section 4.3.3 IPVS 模式的转发原理
- Section 4.3.4 不同模式的性能、维护与排障差异
Chapter 4.4 Ingress 与网关
- Section 4.4.1 为什么需要 Ingress
- Section 4.4.2 Ingress 资源与 Ingress Controller 的关系
- Section 4.4.3 常见入口能力:域名、TLS、路径转发与重写
- Section 4.4.4 从 Ingress 到 Gateway API 的演进趋势
Chapter 4.5 NetworkPolicy
- Section 4.5.1 为什么 Kubernetes 默认网络策略偏开放
- Section 4.5.2 NetworkPolicy 的基本语义与匹配规则
- Section 4.5.3 入站与出站访问控制实战
- Section 4.5.4 使用网络策略实现微服务隔离
Unit 5:存储篇
Chapter 5.1 Volume 类型:容器之外的数据如何保存
- Section 5.1.1 为什么容器需要持久化存储
- Section 5.1.2 emptyDir、hostPath、configMap、secret 等常见 Volume
- Section 5.1.3 临时卷与持久卷的使用边界
- Section 5.1.4 Volume 挂载的常见风险与注意事项
Chapter 5.2 PV / PVC / StorageClass
- Section 5.2.1 PV 与 PVC 的角色分工
- Section 5.2.2 静态供给与动态供给
- Section 5.2.3 StorageClass 如何定义存储能力
- Section 5.2.4 存储绑定、回收策略与扩容机制
Chapter 5.3 StatefulSet 与有状态应用
- Section 5.3.1 为什么 Deployment 不适合所有场景
- Section 5.3.2 StatefulSet 的稳定身份与有序部署
- Section 5.3.3 Headless Service 与 StatefulSet 的配合
- Section 5.3.4 典型场景:数据库、消息队列与分布式存储
Chapter 5.4 CSI 插件机制
- Section 5.4.1 CSI 的出现背景与价值
- Section 5.4.2 CSI Controller 与 Node 侧组件职责
- Section 5.4.3 卷创建、挂载与卸载流程
- Section 5.4.4 生产环境中的 CSI 选型与排障思路
Unit 6:安全篇
Chapter 6.1 RBAC 权限体系
- Section 6.1.1 认证与鉴权在 Kubernetes 中的基本概念
- Section 6.1.2 Role、ClusterRole、RoleBinding、ClusterRoleBinding
- Section 6.1.3 最小权限原则在集群中的落地方式
- Section 6.1.4 常见 RBAC 配置错误与风险
Chapter 6.2 ServiceAccount 与工作负载身份
- Section 6.2.1 ServiceAccount 的作用与默认行为
- Section 6.2.2 Pod 如何使用 ServiceAccount 访问 API Server
- Section 6.2.3 Token 投射与身份边界控制
- Section 6.2.4 工作负载身份管理的最佳实践
Chapter 6.3 Pod 安全标准(v1.32 PSS)
- Section 6.3.1 Pod Security Standards 的背景与目标
- Section 6.3.2 Privileged、Baseline、Restricted 三种级别
- Section 6.3.3 Pod Security Admission 的使用方式
- Section 6.3.4 v1.32 场景下的安全基线建议
Chapter 6.4 Secret 安全管理
- Section 6.4.1 Secret 不是加密系统:需要先理解边界
- Section 6.4.2 Secret 的存储、传输与访问风险
- Section 6.4.3 配合 KMS、External Secrets 等方案增强安全性
- Section 6.4.4 敏感信息轮换与审计实践
Chapter 6.5 Admission Controller
- Section 6.5.1 Admission Controller 位于请求链路的哪里
- Section 6.5.2 Mutating 与 Validating 的区别
- Section 6.5.3 常见内置准入控制器的作用
- Section 6.5.4 使用准入机制统一落实安全与规范
Unit 7:可观测性篇
Chapter 7.1 Metrics:Prometheus + Grafana
- Section 7.1.1 为什么 Kubernetes 需要指标体系
- Section 7.1.2 Prometheus 采集 Kubernetes 指标的方式
- Section 7.1.3 Grafana 仪表盘设计与常见图表
- Section 7.1.4 从节点、Pod 到应用的关键监控指标
Chapter 7.2 Logging:Loki + Promtail
- Section 7.2.1 为什么日志采集不能只依赖 kubectl logs
- Section 7.2.2 Loki 与 Promtail 的基本架构
- Section 7.2.3 容器日志采集、标签组织与检索方式
- Section 7.2.4 日志留存、成本控制与排障实践
Chapter 7.3 Tracing:OpenTelemetry
- Section 7.3.1 分布式追踪解决什么问题
- Section 7.3.2 OpenTelemetry 的核心概念:Trace、Span、Context
- Section 7.3.3 在 Kubernetes 中接入采集器与应用探针
- Section 7.3.4 指标、日志、追踪的关联分析方法
Chapter 7.4 Kubernetes Events 与告警
- Section 7.4.1 Events 的定位与常见使用场景
- Section 7.4.2 如何从 Events 快速发现异常线索
- Section 7.4.3 Alertmanager 与常见告警策略设计
- Section 7.4.4 从“能看见”到“能及时响应”的实践建议
Unit 8:进阶篇
Chapter 8.1 Operator 模式与 CRD 开发(Go + kubebuilder)
- Section 8.1.1 为什么 Kubernetes 需要 CRD 与 Operator
- Section 8.1.2 自定义资源的定义方式与版本管理
- Section 8.1.3 使用 kubebuilder 初始化一个 Operator 项目
- Section 8.1.4 Reconcile 循环与控制器开发基本模式
- Section 8.1.5 一个简单 Operator 的实战学习路线
Chapter 8.2 Kubernetes 高可用架构
- Section 8.2.1 控制平面高可用的基本要求
- Section 8.2.2 etcd 高可用与备份恢复策略
- Section 8.2.3 API Server、Controller Manager、Scheduler 的高可用部署
- Section 8.2.4 负载均衡、故障切换与灾难恢复思路
Chapter 8.3 多集群管理
- Section 8.3.1 为什么会出现多集群需求
- Section 8.3.2 多集群的常见形态:环境隔离、地域分布与业务隔离
- Section 8.3.3 多集群统一发布、观测与权限管理
- Section 8.3.4 多集群实践中的复杂度与治理重点
Chapter 8.4 性能调优与生产最佳实践
- Section 8.4.1 控制平面性能瓶颈与优化方向
- Section 8.4.2 节点资源利用率优化思路
- Section 8.4.3 大规模集群中的对象数量与系统开销控制
- Section 8.4.4 面向生产环境的配置规范与最佳实践清单
Unit 9:故障排查篇
Chapter 9.1 排查方法论与工具
- Section 9.1.1 故障排查的基本步骤:现象、范围、路径、验证
- Section 9.1.2 kubectl 常用排障命令体系
- Section 9.1.3 describe、logs、events、exec 的组合打法
- Section 9.1.4 如何建立一套可复用的排障思维框架
Chapter 9.2 常见 Pod 异常排查
- Section 9.2.1 OOMKilled 的典型原因与处理方式
- Section 9.2.2 CrashLoopBackOff 的定位思路
- Section 9.2.3 Pending 状态的常见触发因素
- Section 9.2.4 镜像拉取失败、探针失败与权限异常排查
Chapter 9.3 网络故障排查
- Section 9.3.1 Pod 间通信失败如何分层定位
- Section 9.3.2 Service 不通时应该检查什么
- Section 9.3.3 DNS 异常、网络策略冲突与入口流量问题
- Section 9.3.4 使用抓包、连通性测试与链路视角排查问题
Chapter 9.4 节点异常处理
- Section 9.4.1 Node NotReady 的排查步骤
- Section 9.4.2 kubelet、容器运行时与系统资源异常
- Section 9.4.3 磁盘、内存、PID 压力导致的问题
- Section 9.4.4 节点维护、驱逐与恢复策略
Chapter 9.5 实战故障复盘
- Section 9.5.1 从一次服务不可用事件开始复盘
- Section 9.5.2 从症状到根因的推理路径
- Section 9.5.3 复盘结论如何转化为工程改进项
- Section 9.5.4 建立团队级故障复盘模板与知识库
📝 版权声明:本文为原创技术博客,转载请注明出处。
如文章中存在错误或不准确之处,欢迎在评论区指正,感谢您的阅读与支持!