k8s介绍-英文版

news/2024/11/16 20:32:54/文章来源:https://www.cnblogs.com/fireyun/p/18377048

目录
  • Why
  • What
    • Synopsis
    • Design Goals
    • Architecture
      • image1
      • image2
      • image3
    • Main Componets
    • Core Resouces
      • some core resouces
      • related cmds
  • How
      • Implementation Mechanism
      • Data Flow

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/

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/786263.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

线段树(2)——懒惰标记Lazy Tag(单运算)及例题

上一篇文章我们讲了线段树的最基本的操作。如果有一种操作叫做区间加法呢?这个时候显然可以依次单点修改,但是时间复杂度太高了。所以可以考虑优化,由于思考过程可能很长,此处直接引入懒惰标记。 懒惰标记就是在对一颗树的所有节点进行某种统一操作时,只对根节点做一个标记…

Python保存数据为xlsx格式

参考代码 运行下面的代码,首先要安装下面这两个库:pandas openpyxlimport pandas as pd processed_data = [{"日期":"20230809","品牌":"Apple"},{"日期":"20230422","品牌":"Huawei"}, ] …

[思考] Diffusion Model

时间线 以下是一些重要的里程碑,它们代表了基于Diffusion的图像生成方法的发展:时间&机构 名称 简述- VAE Variational AutoEncoder,变分自编码器用于图像生成2020.12 VQ-VAE Vector Quantized-Variational AutoEncoder,一种用于生成模型的量化技术2020.12 VQ-GAN Vect…

如何正确使用搜索引擎(屏蔽csdn)

浏览器星愿浏览器 我使用的是星愿浏览器,推荐使用,其中有个性化的设置和搜索引擎的优化辅助,搜索引擎我选择的有:百度 必应 谷歌 DuckDuckGo 检索过程中想要快速切换各种搜索引擎,星愿浏览器有提供辅助拓展插件这里主要推荐每氪净化,可以自动添加屏蔽,例如CSDN搜索后结果…

Pollard Rho 算法

Pollard Rho 算法 难评,看OI-WIKI吧。 引入 Pollard Rho 算法用于求快速找到一个正整数 \(n\) 的一个非平凡因数[1]。 生日悖论不考虑出生年份(假设每年都是365天),问:一个房间中至少多少人,才能使其中两个人生日相通的概率达到 \(50\%\)?解:假设一年有 \(n\) 天,房间…

史上最牛的 权限系统,如何设计? 来了一个 Sa-Token学习圣经

文章很长,且持续更新,建议收藏起来,慢慢读!疯狂创客圈总目录 博客园版 为您奉上珍贵的学习资源 : 免费赠送 :《尼恩Java面试宝典》 持续更新+ 史上最全 + 面试必备 2000页+ 面试必备 + 大厂必备 +涨薪必备 免费赠送 :《尼恩技术圣经+高并发系列PDF》 ,帮你 实现技术自由,…

POLIR-政治-真实社政: 理论与事实的统一与颠倒 : “改革”与“政治民主+经济市场” VS 特权集团为“既得利益”以“集权和垄断”的“假改革”忽悠人

改革有两个永恒的目标:经济的市场化 和 政治的民主化。 特权阶层和既得利益者, 为了“保住特权和既得利益”会拼力地“反对这两个目标“, 他们用“集权和垄断”的“假改革”来忽悠人们,实际上是开历史倒车。吴敬琏(经济学家)

软件工程进度报告——第八周

本周尝试练习了飞机购票问题样例1样例2

RK3588 HDMI IN调试

HDMI RX控制器配置:/* Should work with at least 128MB cma reserved above. */&hdmirx_ctrler {status = "okay";/* Effective level used to trigger HPD: 0-low, 1-high */hpd-trigger-level = <1>;hdmirx-det-gpios = <&gpio1 RK_PD5 GPIO_ACT…

阿里云服务器很久未用,服务访问异常

很久(大概一两个月)都没在使用自己的个人阿里云服务器,当自己再次访问时,竟然报错无法访问,这让自己很是意外!! 然后自己开始排查问题。 登录服务器查看docker服务,发现全部正常。 可是当自己打算重新启动时发现问题,竟然无法重启,这就很奇怪了,服务不都好好的嘛,怎么…

程序设计语言基础-有限自动机+正规式

不确定的有限自动机 NFA 该状态机在任何一个状态,基于输入的字符都不能做成一个确定的状态转换,这里分为两种状况。对于一个输入,它有两个状态可以转换。 存在ε的情况,即没有任何字符输入的情况下,NFA可以从一个状态迁移到另一个状态。确定的有限自动机 DFA 该状态机在任…