Concepts

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.

Overview

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.

在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:

  • The Kubernetes Master is a collection of three processes that run on a single node in your cluster, which is designated as the master node. Those processes are: kube-apiserverkube-controller-manager and kube-scheduler.
  • Each individual non-master node in your cluster runs two processes:
    • kubelet, which communicates with the Kubernetes Master.
    • kube-proxy, a network proxy which reflects Kubernetes networking services on each node.

一旦设定好目标状态,kubernetes control plane会努力使集群的状态等于目标状态。为了达成这个目标,k8s执行很多自动任务,比如启动或重启容器、对某个应用的副本进行扩缩容等等。kubernetes control plane包含很多进程,用于维护和管理整个集群。

  • Master节点(物理机)上运行三个进程:kube-apiserver、kube-controller-manager和kube-scheduler
  • 普通节点(物理机)上运行两个进程:kubelet(与Master节点通信)、kube-proxy(网络代理,在每个节点上转换kubernetes网络)

Kubernetes Objects

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.

k8s包含了很多抽象,用于描述系统状态:部署的容器化的应用和workloads、相关网络和磁盘资源、其他集群状态信息。这些抽象由kubernetes API中的对象表示。

The basic Kubernetes objects include:

基本的kubernetes对象包括Pod、Service、Volume、Namespace。

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:

另外,kubernetes包含很多抽象层次更高的对象,如控制器。控制器基于基本对象,提供更多功能和特性。控制器包括ReplicaSet、Deployment、StatefulSet、DaemonSet和Job。

Kubernetes Control Plane 控制面

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对象时,你需要向系统提供一个目标状态。控制面记录这个对象的创建,根据你的指令,创建所需的应用并将他们列入集群节点中,从而将集群的实际状态贴合目标状态。

Kubernetes Master

The Kubernetes master is responsible for maintaining the desired state for your cluster. When you interact with Kubernetes, such as by using the kubectlcommand-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节点。

Kubernetes Nodes

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控制每个节点,用户很少与这些节点直接交互。

Object Metadata

What’s next

kubernetes concepts (一)的更多相关文章

  1. Kubernetes concepts 系列

    kubernetes concepts overview Pod overview Replication Controller Pod Liftcycle Termination Of Pod Re ...

  2. kubernetes concepts -- Termination Of Pod

    Pods are the smallest deployable units of computing that can be created and managed in Kubernetes. W ...

  3. kubernetes concepts -- Pod Lifecycle

    Pod Lifecycle This page describes the lifecycle of a Pod. Pod phase A Pod’s status field is a PodSta ...

  4. kubernetes concepts -- Replication Controller

    Edit This Page ReplicationController NOTE: A Deployment that configures a ReplicaSet is now the reco ...

  5. kubernetes concepts -- Pod Overview

    This page provides an overview of Pod, the smallest deployable object in the Kubernetes object model ...

  6. Kubernetes初探[1]:部署你的第一个ASP.NET Core应用到k8s集群

    Kubernetes简介 Kubernetes是Google基于Borg开源的容器编排调度引擎,作为CNCF(Cloud Native Computing Foundation)最重要的组件之一,它的 ...

  7. Announcing the public preview of Azure Dev Spaces

    Today, we are excited to announce the public preview of Azure Dev Spaces, a cloud-native development ...

  8. 写在19年初的后端社招面试经历(两年经验): 蚂蚁 头条 PingCAP

    去年(18年)年底想出来看看机会,最后很幸运地拿到了 PingCAP,今日头条的 offer 以及蚂蚁金服的口头 offer.想着可以总结一下经验,分享一下自己这一段"骑驴找马"过 ...

  9. [k8s]k8s配置nfs做后端存储&配置多nginx共享存储&&statefulset配置

    所有节点安装nfs yum install nfs-utils rpcbind -y mkdir -p /ifs/kubernetes echo "/ifs/kubernetes 192.1 ...

随机推荐

  1. Roslyn NameSyntax 的 ToString 和 ToFullString 的区别

    本文告诉大家经常使用的 NameSyntax 拿到值的 ToString 和 ToFullString 方法的区别 从代码可以看到 NameSyntax 的 ToString 和 ToFullStri ...

  2. H3C查看、删除已经保存配置文件--用户图示(console)以上

    <H3C>display saved-configuration    //显示已经保存的内容 <H3C>reset saved-configuration      //删除 ...

  3. Lede定时重拨

    系统,计划任务,   0 4 * * * ifup wan 梅林定时重拨: #! /bin/sh #断开拨号连接 killall pppd #延时10秒 #重新拨号 pppd >& &a ...

  4. UTF-8、UTF-16、UTF-32编码的相互转换(不使用现成的函数)

    最近在考虑写一个可以跨平台的通用字符串类,首先需要搞定的就是编码转换问题. vs默认保存代码文件,使用的是本地code(中文即GBK,日文即Shift-JIS),也可以使用带BOM的UTF-8.gcc ...

  5. mac笔记本安装Android sdk

    一.先下载android sdk for mac   给二个靠谱的网址: a). http://down.tech.sina.com.cn/page/45703.html b). http://mac ...

  6. IDEA比较实用的插件之翻译插件(Translation)

    插件名称:Translation 安装步骤:Mac 2019.2的IDEA安装步骤如下 InteIIij IDEA --> Preference --> Other Setting --& ...

  7. 利用脚本运行APP

    1.电脑安装Xcode(iOS)/Androidsdk(Android),连接手机,并在手机上安装相应代理,下图为iOS的Xcode代理样式: 2.打开Appium,点击搜索图标,添加并设置该手机信息 ...

  8. 急速搭建 Serverless AI 应用:为你写诗

    前言 首先介绍下在本文出现的几个比较重要的概念: 函数计算(Function Compute): 函数计算是一个事件驱动的服务,通过函数计算,用户无需管理服务器等运行情况,只需编写代码并上传.函数计算 ...

  9. 洛谷$P2153\ [SDOI2009]$ 晨跑 网络流

    正解:网络流 解题报告: 传送门$QwQ$ 题目好长昂,,,大概概括下$QwQ$.就说有$n$个节点$m$条边,然后要求每次走的路径都不一样,问最多能走多少次,然后在次数最多的前提下问路径最短是多少$ ...

  10. DNS服务器红帽5.4搭建图文教程!!!

    DNS服务器 挂载光盘 mount 查看光盘所在位置 mount -t iso9660 设备目录 /mnt 表示挂载 软件包安装 所有软件包都在Server目录下 rpm -ivh /mnt/Serv ...