K8S核心组件和架构图
K8S Docs Concepts:https://kubernetes.io/docs/concepts/
(1)先以container为起点,k8s既然是容器编排工具,那么一定会有container
(2)那k8s如何操作这些container呢?从感性的角度来讲,得要有点逼格,k8s不想直接操作 container,因为操作container的事情是docker来做的,k8s中要有自己的最小操作单位,称之为 Pod 说白了,Pod就是一个或多个Container的组合
看看官网怎么描述的 https://kubernetes.io/docs/concepts/workloads/pods/pod/
A Pod (as in a pod of whales or pea pod) is a group of one or more containers (such as Docker containers),with shared storage/network, and a specification for how to run the containers.
(3)那Pod的维护谁来做呢?那就是ReplicaSet,通过selector来进行管理
看看官网怎么描述的 :https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/
A ReplicaSet is defined with fields, including a selector that specifies how to identify Pods it can acquire, a number of replicas indicating how many Pods it should be maintaining, and a pod template specifying the data of new Pods it should