当前位置:网站首页>傲視Kubernetes(一):Kubernetes簡介
傲視Kubernetes(一):Kubernetes簡介
2020-11-07 16:50:00 【itread01】
前言
從上個月,因工作需要外加興趣所知,博主開始學習Kubernetes,時至今日可以說是剛剛入門。獨自學不如一起學,後面博主會一邊學著一邊將學習內容以博文的形式呈現出來,希望能跟各位園友有問題一起討論,在不斷的交流中互補有無,一起學習進步。本系列取名【傲視Kubernetes】,要的就是這股氣勢,力爭把它學好學精。閒話少敘,下面開始傲視Kubernetes之旅。
目標:
1、Kubernetes是什麼?為什麼要用Kubernetes?
2、Kubernetes和Docker的關係
3、Kubernetes的架構
正文
1、Kubernetes是什麼?為什麼要用Kubernetes?
相信幹過開發的園友們都能感受到近年來微服務化的流行,不管是求職面試時,還是公眾號朋友圈各種打廣告的培訓班,都會提到微服務的相關東西。而隨著越來越多單體專案的微服務化,以及大專案的微服務拆分,需要有一個應用可以針對數量眾多的微服務進行自動排程、配置、監管和故障處理,而這就是Kubernetes的定位。
且看一下官網對Kubernetes的定義:Kubernetes is an open source container orchestration engine for automating deployment, scaling, and management of containerized applications.
可以看出來,它是一個開源的容器編排引擎,這個引擎可以自動部署、伸縮和管理容器化應用。大體上跟咱上面總結的大差不差。
說完了Kubernetes是什麼,再來看它的優勢是什麼?為什麼要用它呢?
1)、簡化應用程式部署:即你不需要關注你的應用部署在了哪臺機器上,Kubernetes會自動給你準備好需要的計算資源和儲存資源。並且只要叢集搭建的方式一樣,它也可以保證開發測試生產環境的一致性。
2)、更好的利用硬體:Kubernetes在給應用分配執行節點時,會自動匹配最優的節點,提高資源利用率。
3)、健康檢查和自修復:Kubernetes會監控你應用執行的節點的狀態,當它出現故障時,會重新排程其他節點補上,無需人工參與。
4)、自動擴容:可以讓Kubernetes根據應用程式的負載情況自動做出反應,比如增加節點或減少節點。
2、Kubernetes和Docker的關係
說它們關係之前,首先要提一下Docker是什麼。
Docker是一個打包、分發和執行應用程式的容器平臺。容器相當於一種輕量級的虛擬機器。虛擬機器是在宿主機的基礎上又重新建立了一套自己的作業系統,虛擬機器中的程序執行在這個虛擬出來的作業系統上。而容器則作為一個程序仍然執行在宿主機的作業系統上,所以相比虛擬機器容器不需要額外創建出一套作業系統,節省了資源,更輕量級。容器的隔離機制,是藉助於Linux名稱空間和cgroup來實現的。
再來看Docker和Kubernetes的關係。從上面第一部分Kubernetes的定義中我們知道,Kubernetes是一個容器編排引擎,可以管理容器化應用。此處的容器化技術就是指Docker,即Kubernetes管理Docker容器化出來的容器。當然隨著容器化技術的發展,除了Docker之外,Kubernetes還支援其他的幾種容器化技術,比如containered、CRI-O等。
3、Kubernetes的架構
Kubernetes架構可以分為以下兩部分:控制面板和工作節點。具體組成大體如下圖所示,此處只需有個大體的印象即可,後面會一起更詳細的學習。
apiserver:是Kubernetes叢集操作的入口,外界操作指令先到apiserver,然後它再把指令下發到具體的節點/服務
etcd:是Kubernetes叢集的分散式配置資料中心,所有叢集的配置都存在它那裡
Scheduler:Kubernetes排程器,負責pod的分配
Controller Manager:執行叢集級別的功能,比如跟蹤工作節點、處理失敗節點等
kubelet:與apiserver通訊,並管理它所在節點的容器
kube-proxy:負責節點的網路通訊
容器執行時(container runtime):指docker等容器化
版权声明
本文为[itread01]所创,转载请带上原文链接,感谢
https://www.itread01.com/content/1604730063.html
边栏推荐
- confd
- Test the necessary skill points of siege lion! This article takes you to interpret the testing technology under Devops
- August 24, 2020: what are small documents? What's wrong with a lot of small files? How to solve many small files? (big data)
- Introduction to Jenkins (2) declarative pipeline
- Git remote library rollback specified version
- 10000! Ideal car recalls all defective cars: 97 accidents have occurred and losses will be expanded
- QT audio and video development 46 video transmission UDP version
- RFID fixed assets management system for fire equipment
- Points to be considered when deleting mapping field of index in ES
- 廬山真面目之二微服務架構NGINX版本實現
猜你喜欢
如何利用PopupWindow实现弹出菜单并解决焦点获取以及与软键盘冲突问题
jenkins pipline stage 设置超时
8.Swarm创建维护和水平扩展Service
ImageMagick - 添加水印
如何创建交互式内核密度图表
Getting started with varhart xgantt
Insomnia all night
cubemx做stm32 USB开发
Detailed software engineering -- the necessary graphs in each stage
2020-08-19: what mechanism does TCP ensure reliability?
随机推荐
August 18, 2020: introduce Mr process?
Win7 AppCrash (solution)
快進來!花幾分鐘看一下 ReentrantReadWriteLock 的原理!
A good thing for working people -- to temper the will of iron and steel requires such an efficient computer
And how to solve the conflict between pop-up menu and pop-up menu
Idea activation to 2089 failure
K-vim installation and the ycmd server shut down (restart with ': ycmrestartserver')
Two dimensional code location and alarm system of Expressway
How to write plug-in code of small program mall system? How to use code to check whether the plug-in is successfully added?
Three steps to understand Kerberos Protocol easily
嘉宾专访|2020 PostgreSQL亚洲大会中文分论坛:岳彩波
Common mathematical basic formulas of recursive and backtracking algorithms
“非洲用户的付费意愿并不低”——专访四达时代研发总监张亮
Composition of MRAM cache
win7如何快速打cmd并到达所要的目录
September 9, 2020: naked writing algorithm: two threads print numbers 1-100 in turn.
2020-08-19: what mechanism does TCP ensure reliability?
Solution to st link USB communication error in stlink Download
小程序商城系统插件代码该如何写?怎么用代码检查添加插件是否成功?
The advantages and functions of psychological counseling app