首页 > 其他分享 >Kubernetes Components

Kubernetes Components

时间:2023-09-07 16:11:43浏览次数:49  
标签:Kubernetes cluster controller plane Components kube cloud

Kubernetes Components

When you deploy Kubernetes, you get a cluster.

A Kubernetes cluster consists of a set of worker machines, called nodes, that run containerized applications. Every cluster has at least one worker node.

The worker node(s) host the Pods that are the components of the application workload.

The control plane manages the worker nodes and the Pods in the cluster.

In production environments, the control plane usually runs across multiple computers and a cluster usually runs multiple nodes, providing fault-tolerance and high availability.

This document outlines the various components you need to have for a complete and working Kubernetes cluster.

The components of a Kubernetes cluster

1 Control Plane Components

The control plane's components make global decisions about the cluster (for example, scheduling), as well as detecting and responding to cluster events (for example, starting up a new pod when a deployment's replicas field is unsatisfied).

Control plane components can be run on any machine in the cluster.
However, for simplicity, set up scripts typically start all control plane components on the same machine, and do not run user containers on this machine. See Creating Highly Available clusters with kubeadm for an example control plane setup that runs across multiple machines.

1.1 kube-apiserver

The API server is a component of the Kubernetes control plane that exposes the Kubernetes API. The API server is the front end for the Kubernetes control plane.

The main implementation of a Kubernetes API server is kube-apiserver. kube-apiserver is designed to scale horizontally—that is, it scales by deploying more instances. You can run several instances of kube-apiserver and balance traffic between those instances.

1.2 etcd

Consistent and highly-available key value store used as Kubernetes' backing store for all cluster data.

If your Kubernetes cluster uses etcd as its backing store, make sure you have a back up plan for the data.

You can find in-depth information about etcd in the official documentation.

1.3 kube-scheduler

Control plane component that watches for newly created Pods with no assigned node, and selects a node for them to run on.

Factors taken into account for scheduling decisions include: individual and collective resource requirements, hardware/software/policy constraints, affinity and anti-affinity specifications, data locality, inter-workload interference, and deadlines.

1.4 kube-controller-manager

Control plane component that runs controller processes.

Logically, each controller is a separate process, but to reduce complexity, they are all compiled into a single binary and run in a single process.

There are many different types of controllers. Some examples of them are:

  • Node controller: Responsible for noticing and responding when nodes go down.
  • Job controller: Watches for Job objects that represent one-off tasks, then creates Pods to run those tasks to completion.
  • EndpointSlice controller: Populates EndpointSlice objects (to provide a link between Services and Pods).
  • ServiceAccount controller: Create default ServiceAccounts for new namespaces.

The above is not an exhaustive list.

1.5 cloud-controller-manager

A Kubernetes control plane component that embeds cloud-specific control logic. The cloud controller manager lets you link your cluster into your cloud provider's API, and separates out the components that interact with that cloud platform from components that only interact with your cluster.

The cloud-controller-manager only runs controllers that are specific to your cloud provider. If you are running Kubernetes on your own premises, or in a learning environment inside your own PC, the cluster does not have a cloud controller manager.

As with the kube-controller-manager, the cloud-controller-manager combines several logically independent control loops into a single binary that you run as a single process. You can scale horizontally (run more than one copy) to improve performance or to help tolerate failures.

The following controllers can have cloud provider dependencies:

  • Node controller: For checking the cloud provider to determine if a node has been deleted in the cloud after it stops responding
  • Route controller: For setting up routes in the underlying cloud infrastructure
  • Service controller: For creating, updating and deleting cloud provider load balancers

2 Node Components

Node components run on every node, maintaining running pods and providing the Kubernetes runtime environment.

2.1 kubelet

An agent that runs on each node in the cluster. It makes sure that containers are running in a Pod.

The kubelet takes a set of PodSpecs that are provided through various mechanisms and ensures that the containers described in those PodSpecs are running and healthy. The kubelet doesn't manage containers which were not created by Kubernetes.

2.2 kube-proxy

kube-proxy is a network proxy that runs on each node in your cluster, implementing part of the Kubernetes Service concept.

kube-proxy maintains network rules on nodes. These network rules allow network communication to your Pods from network sessions inside or outside of your cluster.

kube-proxy uses the operating system packet filtering layer if there is one and it's available. Otherwise, kube-proxy forwards the traffic itself.

2.3 Container runtime

A fundamental component that empowers Kubernetes to run containers effectively. It is responsible for managing the execution and lifecycle of containers within the Kubernetes environment.

Kubernetes supports container runtimes such as containerd, CRI-O, and any other implementation of the Kubernetes CRI (Container Runtime Interface).

3 Addons

Addons use Kubernetes resources (DaemonSet, Deployment, etc) to implement cluster features. Because these are providing cluster-level features, namespaced resources for addons belong within the kube-system namespace.

Selected addons are described below; for an extended list of available addons, please see Addons.

3.1 DNS

While the other addons are not strictly required, all Kubernetes clusters should have cluster DNS, as many examples rely on it.

Cluster DNS is a DNS server, in addition to the other DNS server(s) in your environment, which serves DNS records for Kubernetes services.

Containers started by Kubernetes automatically include this DNS server in their DNS searches.

3.2 Web UI (Dashboard)

Dashboard is a general purpose, web-based UI for Kubernetes clusters. It allows users to manage and troubleshoot applications running in the cluster, as well as the cluster itself.

3.3 Container Resource Monitoring

Container Resource Monitoring records generic time-series metrics about containers in a central database, and provides a UI for browsing that data.

3.4 Cluster-level Logging

A cluster-level logging mechanism is responsible for saving container logs to a central log store with search/browsing interface.

3.5 Network Plugins

Network plugins are software components that implement the container network interface (CNI) specification. They are responsible for allocating IP addresses to pods and enabling them to communicate with each other within the cluster.

What's next

Learn more about the following:

标签:Kubernetes,cluster,controller,plane,Components,kube,cloud
From: https://www.cnblogs.com/JaxYoun/p/17685211.html

相关文章

  • kubernetes deploy standalone mysql demo
    kubernetes集群内部署单节点mysqlansibleall-mshell-a"mkdir-p/mnt/mysql/data"catmysql-pv-pvc.yamlapiVersion:v1kind:PersistentVolumemetadata:name:mysql-pv-volumelabels:type:localspec:storageClassName:manualcapacity:s......
  • rke2 在线部署 kubernetes
    文章目录1.还原虚拟机2.背景3.介绍4.预备条件5.1配置网卡5.配置主机名6.配置互信7.安装ansible8.系统初始化9.kube-master01部署9.1定制配置文件(可选)9.2部署9.3命令配置9.4检查节点10.配置其他管理节点11.Agent节点配置12.检查集群13.配置管理工具14.卸载1......
  • Kubernetes快速进阶与实战:构建可靠的容器化应用平台
    ......
  • kubeadm部署kubernetes+harbor
    kubeadm部署kubernetes+harbor架构图 安装步骤1、在所有节点上安装Docker和kubeadm2、部署KubernetesMaster3、部署容器网络插件4、部署KubernetesNode,将节点加入Kubernetes集群中5、部署DashboardWeb页面,可视化查看Kubernetes资源6、部署Har......
  • OpenMLDB 基于 Kubernetes 的部署全攻略
    简介Kubernetes作为当前工业界流行的云原生容器编排和管理工具,在大量项目实践中被使用。目前,OpenMLDB的离线引擎和在线引擎,均已经完整支持了基于Kubernetes的部署,可以实现更为方便的管理功能。本文将分别介绍离线和在线引擎基于Kubernetes的部署攻略。注意,离线和在线引擎......
  • 关于Kubernetes-v1.23.6-StartupProbe-启动探针的效果演示及说明
    本文,还是以一个nginx为例,创建一个nginx-demo的pod,并且引入启动探针StartupProbe,探针选项,位于spec:下面的containers:下面,与image选项同级的位置1、先看如下nginx-demo.yaml文件,内容如下:[root@k8s-masterqq-5201351]#catnginx-demo.yamlapiVersion:v1#api文档......
  • 【Azure Kubernetes】通过 kubelogin 进行非交互式登录AKS
    问题描述当对AKS的登录方式(认证和授权)从“LocalAccountwithKubernetesRBAC”改变为“AzureADauthenticationwithAzureRBAC”.通过kubectl连接AKS会要求交互式登录,需要通过浏览器输入认证码后关联azure登录用户。那么,是否有办法可以避免这种交互式登录呢?  问......
  • 【Azure Kubernetes】通过 kubelogin 进行非交互式登录AKS
    问题描述当对AKS的登录方式(认证和授权)从“LocalAccountwithKubernetesRBAC”改变为“AzureADauthenticationwithAzureRBAC”.通过kubectl连接AKS会要求交互式登录,需要通过浏览器输入认证码后关联azure登录用户。那么,是否有办法可以避免这种交互式登录呢? 问题解答答......
  • VMware Tanzu Kubernetes Grid (TKG) 2.3 - 企业级 Kubernetes 解决方案
    VMwareTanzuKubernetesGrid(TKG)2.3-企业级Kubernetes解决方案VMware构建、签名和支持的开源Kubernetes容器编排平台的完整分发版请访问原文链接:https://sysin.org/blog/vmware-tkg-2/,查看最新版。原创作品,转载请保留出处。作者主页:sysin.orgTanzuKubernetes集......
  • kubernetes(K8s)快速入门
    ......