首页 > 其他分享 >k8s介绍-英文版

k8s介绍-英文版

时间:2024-08-23 20:36:49浏览次数:6  
标签:Kubernetes desired 介绍 cluster state API 英文版 k8s pods

目录

Why

We need a set of tools and technologies designed to efficiently deploy, manage, and orchestrate containerized applications in a container runtime environment.

What

Synopsis

K8s, short for Kubernetes, is an open-source container orchestration platform originally developed by Google and now maintained by the Cloud Native Computing Foundation (CNCF). It is one of the most popular and widely used tools for automating the deployment, scaling, and management of containerized applications.

Design Goals

The main goals of Kubernetes are to simplify and automate the management of containerized workloads, provide a consistent and reliable platform for deploying applications, and enable seamless scaling and integration in modern cloud-native environments.

Architecture

image1

Image from: https://devopscube.com/kubernetes-architecture-explained/

image2

Complete diagram of Kubernetes Architecture and Kubernetes Process.

Image from: https://phoenixnap.com/kb/understanding-kubernetes-architecture-diagrams

image3

Components of Kubernetes

Image from: https://kubernetes.io/docs/concepts/overview/components/

Main Componets

Component Description
Control Plane Components
API Server Exposes the Kubernetes API and processes API requests to maintain the desired state of the cluster.
etcd A distributed key-value store that stores the cluster's configuration data, ensuring data consistency.
Scheduler Responsible for making decisions about where to place newly created pods based on resource requirements.
Controller Manager A collection of controllers that monitor the cluster's state and perform actions to maintain the desired state.
Cloud Controller Manager Provides an interface to interact with cloud provider APIs for managing cloud-specific resources.
Node Components
Kubelet Runs on each node and ensures that containers are running and healthy. It communicates with the API server.
Container Runtime The software responsible for running containers, such as Docker or containerd.
Kube-Proxy Handles network routing for services and maintains network rules on nodes.
Additional Components
Ingress Controller Manages external access to services within the cluster by routing incoming traffic.
Dashboard A web-based user interface for managing and monitoring the cluster.
DNS Provides DNS-based service discovery for pods and services within the cluster.

Core Resouces

some core resouces

Resource Description
Pods The smallest deployable unit in Kubernetes. A pod is a group of one or more tightly coupled containers that share the same network namespace and can be scheduled and deployed together on the same host.
ReplicaSets A higher-level abstraction that ensures a specified number of identical pods are running at all times. It can be used to scale the number of pods up or down based on defined rules.
Deployments A higher-level resource that manages ReplicaSets and provides declarative updates for Pods and ReplicaSets. Deployments allow you to specify the desired state of the application, and Kubernetes handles the actual state reconciliation.
Services An abstraction that exposes a set of pods to other services within the cluster or externally. Services provide load balancing and a stable endpoint for connecting to the pods.
Namespaces A way to logically divide and isolate resources within a cluster. Namespaces are used to avoid naming collisions and to organize resources into manageable groups.
ConfigMaps and Secrets Resources to store configuration data and sensitive information, respectively, outside of the container images. They can be mounted as volumes or passed as environment variables to containers.
Persistent Volumes Resources that allow decoupling of storage from pods. Persistent Volumes (PVs) represent physical storage, and Persistent Volume Claims (PVCs) are requests for that storage.
StatefulSets A higher-level abstraction for managing stateful applications. It ensures that pods are created and scaled in a specific order, and each pod gets a stable hostname.
DaemonSets Ensures that a specific pod runs on each node in the cluster, ensuring that certain background tasks, logging agents, or monitoring agents are present on every node.
Jobs and CronJobs Resources to run batch or one-time tasks (Jobs) or scheduled tasks (CronJobs) within the cluster.
Horizontal Pod Autoscaler (HPA) A resource that automatically scales the number of pods in a deployment based on CPU utilization or custom metrics.
Network Policies These define how pods are allowed to communicate with each other within the cluster, providing a level of network segmentation and security.
Ingress A resource that manages external access to services within the cluster by exposing HTTP and HTTPS routes to the services.
# show all the k8s resource types
kubectl api-resources
# get detailed information of a resource type
kubectl explain pods
kubectl explain pods.metadata

How

Implementation Mechanism

Kubernetes works based on a combination of declarative configuration, control loops, and API interactions. Its implementation mechanism involves several components collaborating to manage containerized applications efficiently. Here's a high-level overview of how Kubernetes works:

  1. Declarative Configuration: Users define the desired state of the cluster and applications using YAML or JSON manifests.

  2. API Server: The central component that exposes the Kubernetes API, handling requests from clients.

  3. etcd: A distributed key-value store that stores the desired state of the cluster.

  4. Controllers and Control Loops: Controllers monitor the cluster's state and take corrective actions to ensure it matches the desired state.

  5. Scheduler: Determines the best node to place new pods based on resource requirements and constraints.

  6. Kubelet and Data Plane: Kubelet on each node executes and manages containers. Data plane components handle container execution and networking.

  7. Client Tools: Tools like kubectl and the Kubernetes Dashboard interact with the API server to manage the cluster.

In summary, Kubernetes works by maintaining a desired state specified through declarative configuration. It employs control loops, controllers, and API interactions to continuously monitor and reconcile the actual state with the desired state. This ensures that the cluster remains in the desired state, even as workloads and conditions change over time. The data plane components on each node execute and manage containers, while the control plane components orchestrate and manage the overall state of the cluster.

Data Flow

Example: create a pod.

Image from: https://devopscube.com/kubernetes-architecture-explained/

标签:Kubernetes,desired,介绍,cluster,state,API,英文版,k8s,pods
From: https://www.cnblogs.com/fireyun/p/18377048

相关文章

  • C语言数组介绍(详解)
    数组目录数组概念一维数组⼀维数组的创建和初始化一维数组的基本创建一维数组的初始化数组的类型一维数组的使用数组下标数组元素的打印数组的输入一维数组内存中的储存如何用sizefo计算数组元素个数二维数组二维数字的概念二维数组的创建二维数组的初始化二维数组的......
  • 智慧园区:AI赋能下的创新应用场景探索及多场景解决方案介绍
    随着人工智能(AI)技术的飞速发展,各行各业都在经历着前所未有的变革,智慧园区作为城市智慧化建设的重要组成部分,正逐步成为AI技术应用的热土。智慧园区通过集成物联网、大数据、云计算、人工智能等先进技术,实现了园区管理、运营、服务等多个环节的智能化升级,为入驻企业及管理者带来了......
  • Java异常-介绍
    异常的基本概念异常(Exception)是程序在运行时发生的、不正常的或意外的状况,它打断了程序的正常执行流程。在编程中,异常用于处理错误情况,使得程序能够以一种优雅的方式响应错误,而不是简单地崩溃或终止执行。异常的定义在Java等编程语言中,异常被定义为一种特殊的对象,它是Throwa......
  • Python部分常用内置模块介绍
      Python作为一种高级编程语言,提供了大量的内置模块来处理各种常见的任务。这些模块不需要额外安装就可以使用,极大地丰富了Python的功能性和灵活性。下面是一些常用的Python内置模块及其简要介绍:1. mathmath 模块提供了数学函数,如平方根、对数等。使用示例:impor......
  • K8S之Ingress
    IngressService一般情况下只作用内部Pod的代理调度,如果只指定一个NodeIP,随着业务量增大,这个Node压力就会很大,这时可能会在前端加一个代理,代理几个Node。在应用小的情况下,这种架构还能接受。但如果有大量应用的话,我们就需要管理大量的NodePort,这时就需要Ingress来解决Ingre......
  • K8S之Ingress常用Nginx、Traefik示例
    NginxIngress创建Pod、Service,定义如下nginx-ingress-demo.yamlapiVersion:extensions/v1beta1kind:Deploymentmetadata:name:nginx-deploynamespace:defaultspec:replicas:3selector:matchLabels:app:nginx-demoreplease:canary......
  • K8S之namespace资源限制
    在默认情况下,K8S不会对Pod进行CPU和内存限制,如果某个Pod发生内存泄露那么将是一个非常糟糕的事情所以在部署Pod的时候都会把Requests和limits加上,配置文件示例如下apiVersion:apps/v1kind:Deploymentmetadata:name:ng-deployspec:selector:matchLables:......
  • K8S基本概念和组件
    特点便携性无论公有云、私有云、混合云还是多云架构都全面支持可扩展模块化、可插拔、可挂载、可组合,支持各种形式的扩展自修复自保持应用状态、自重启、自复制、自缩放,声明式语法组件etcd保存整个集群状态,充当数据库角色,只与APIServer通讯apiserve......
  • K8S之Pod对象
    Pod是一组紧密关联的容器组合,共享PID,NETWORK,UTSnamespace。一个Pod里可以运行多个容器。一个Pod里多个容器共享网络和文件系统原理K8S真正处理的还是宿主机操作系统上的namespace和Cgroups,而不存在一个Pod边界或者隔离环境。Pod里所有的容器共享的是同一个NetworkNameS......
  • K8S之Service
    对于K8S整个集群来说,Pod地址是可变的。一个Pod因某些原因退出了,而其设置了副本数replicas大于1那么该Pod就会在集群的任意节点重新启动。重新启动后的Pod的IP与原IP地址不同,这样就不能根据Pod的IP来进行调度。于是K8S引入了Service概念,它为Pod提供了一个入口,主要通过Labels标签来......