The Concepts section helps you learn about the parts of the Kubernetes system and the abstractions Kubernetes uses to represent your cluster, and helps you obtain a deeper understanding of how Kubernetes works.node
To work with Kubernetes, you use Kubernetes API objects to describe your cluster’s desired state: what applications or other workloads you want to run, what container images they use, the number of replicas, what network and disk resources you want to make available, and more. You set your desired state by creating objects using the Kubernetes API, typically via the command-line interface, kubectl
. You can also use the Kubernetes API directly to interact with the cluster and set or modify your desired state.api
在K8s中,你能够运行应用或其余workloads,应用能够使用容器镜像,每一个应用能够有多个副本(replicas),能够使用网络和磁盘资源。kubernetes API能够用于查询、配置、修改这些应用的目标状态,命令行接口为kubectl。服务器
Once you’ve set your desired state, the Kubernetes Control Plane works to make the cluster’s current state match the desired state. To do so, Kubernetes performs a variety of tasks automatically–such as starting or restarting containers, scaling the number of replicas of a given application, and more. The Kubernetes Control Plane consists of a collection of processes running on your cluster:网络
一旦设定好目标状态,kubernetes control plane会努力使集群的状态等于目标状态。为了达成这个目标,k8s执行不少自动任务,好比启动或重启容器、对某个应用的副本进行扩缩容等等。kubernetes control plane包含不少进程,用于维护和管理整个集群。app
Kubernetes contains a number of abstractions that represent the state of your system: deployed containerized applications and workloads, their associated network and disk resources, and other information about what your cluster is doing. These abstractions are represented by objects in the Kubernetes API; see the Kubernetes Objects overview for more details.ide
k8s包含了不少抽象,用于描述系统状态:部署的容器化的应用和workloads、相关网络和磁盘资源、其余集群状态信息。这些抽象由kubernetes API中的对象表示。oop
The basic Kubernetes objects include:ui
基本的kubernetes对象包括Pod、Service、Volume、Namespace。this
In addition, Kubernetes contains a number of higher-level abstractions called Controllers. Controllers build upon the basic objects, and provide additional functionality and convenience features. They include:spa
另外,kubernetes包含不少抽象层次更高的对象,如控制器。控制器基于基本对象,提供更多功能和特性。控制器包括ReplicaSet、Deployment、StatefulSet、DaemonSet和Job。
The various parts of the Kubernetes Control Plane, such as the Kubernetes Master and kubelet processes, govern how Kubernetes communicates with your cluster. The Control Plane maintains a record of all of the Kubernetes Objects in the system, and runs continuous control loops to manage those objects’ state. At any given time, the Control Plane’s control loops will respond to changes in the cluster and work to make the actual state of all the objects in the system match the desired state that you provided.
控制面的多个组件共同管理Kubernetes集群中的通讯,例如kubernetes Master进程和kubelet集成。控制面维护系统中全部对象的记录,并运行不间断的控制器循环来管理这些对象的状态。在任意时间,控制面的控制循环会对集群中的更改作出相应,并努力将全部对象的实际状态向用户设置的目标状态靠近。
For example, when you use the Kubernetes API to create a Deployment object, you provide a new desired state for the system. The Kubernetes Control Plane records that object creation, and carries out your instructions by starting the required applications and scheduling them to cluster nodes–thus making the cluster’s actual state match the desired state.
例如,当你经过kubernetes API创造一个Deployment对象时,你须要向系统提供一个目标状态。控制面记录这个对象的建立,根据你的指令,建立所需的应用并将他们列入集群节点中,从而将集群的实际状态贴合目标状态。
The Kubernetes master is responsible for maintaining the desired state for your cluster. When you interact with Kubernetes, such as by using the kubectl
command-line interface, you’re communicating with your cluster’s Kubernetes master.
Kubernetes master负责维护集群的目标状态。当你与kubernetes交互时,如使用kubectl 命令行接口,其实是在与kubernetes集群的kubernetes master进程交互。
The “master” refers to a collection of processes managing the cluster state. Typically these processes are all run on a single node in the cluster, and this node is also referred to as the master. The master can also be replicated for availability and redundancy.这里的master指管理集群状态的一些集成。典型状况这些进程都运行在集群的一个节点上,这个节点node也被称为master节点。
The nodes in a cluster are the machines (VMs, physical servers, etc) that run your applications and cloud workflows. The Kubernetes master controls each node; you’ll rarely interact with nodes directly.
kubernetes集群中的节点就是能够运行应用和cloud workflows的机器,如VM,物理服务器等。kubernetes master控制每一个节点,用户不多与这些节点直接交互。