K8s 学习者绝对不能错过的最全知识图谱(内含 58个知识点链接)
作者 | 平名 阿里服務(wù)端開發(fā)技術(shù)專家
導(dǎo)讀:Kubernetes 作為云原生時(shí)代的“操作系統(tǒng)”,熟悉和使用它是每名用戶的必備技能。本篇文章概述了容器服務(wù) Kubernetes 的知識(shí)圖譜,部分內(nèi)容參考了網(wǎng)上的知識(shí)圖譜,旨在幫助用戶更好的了解 K8s 的相關(guān)知識(shí)。
概述
容器服務(wù) Kubernetes 知識(shí)圖譜,部分內(nèi)容參考網(wǎng)上一知識(shí)圖譜,更加結(jié)合阿里云容器服務(wù)。
原圖 by 楊傳勝
原圖鏈接地址https://www.processon.com/view/link/5ac64532e4b00dc8a02f05eb#map
知識(shí)鏈接和備注
Docker 原理
- KVM–> ECS
https://blog.csdn.net/weixin_43695104/article/details/88554443#32_kvm_web_192
- 網(wǎng)絡(luò)隧道技術(shù)–>VPC
https://blog.csdn.net/wangjianno2/article/details/75208036
- NameSpace
https://blog.csdn.net/a352193394/article/details/53344167
備注:Linux 容器中用來實(shí)現(xiàn)“隔離”的技術(shù)手段:Namespace,Namespace 技術(shù)實(shí)際上修改了應(yīng)用進(jìn)程看待整個(gè)計(jì)算機(jī)的范圍,它的訪問范圍被操作系統(tǒng)做了限制,只能“看到”某些指定的內(nèi)容。
- CGroup
https://blog.csdn.net/wudongxu/article/details/8474198
備注:Linux Control Group。它最主要的作用,就是限制一個(gè)進(jìn)程組能夠使用的資源上限,包括 CPU、內(nèi)存、磁盤、網(wǎng)絡(luò)帶寬等等。
- RootFS(Union FS)
https://coolshell.cn/articles/17061.html
備注:rootfs 只是一個(gè)操作系統(tǒng)所包含的文件、配置和目錄,并不包括操作系統(tǒng)內(nèi)核。在 Linux 操作系統(tǒng)中,這兩部分是分開存放的,操作系統(tǒng)只有在開機(jī)啟動(dòng)時(shí)才會(huì)加載指定版本的內(nèi)核鏡像。
- windows 2019
備注:windowserver 2019開始支持 namespace
容器服務(wù)部署
- Docker Desktop
https://www.docker.com/products/docker-desktop
備注:Mac 機(jī)器上強(qiáng)烈建議安裝該軟件作為學(xué)習(xí)使用
- kubernetes
http://docs.kubernetes.org.cn/
備注:kubernetes 集群,aliyun容器服務(wù)支持
- DashBoard
https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/
備注:kubernetes 集群的圖形界面管理工具,容器服務(wù)控制臺(tái)整合了該應(yīng)用并擴(kuò)展
- EasyPack
https://github.com/liumiaocn/easypack
備注:一批部署 kubernetes 等集群的腳本集合
- minikube
https://kubernetes.io/docs/tasks/tools/install-minikube/
備注:mini 新 K8s
工具組件
- kubectl
http://docs.kubernetes.org.cn/61.html備注:kubectl 用于運(yùn)行 Kubernetes 集群命令的管理工具
- kubeadm
https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm/Kubernetes
備注:官方提供的用于快速安裝配置 Kubernetes 集群的工具
- Helm
備注:類似 rpm,yum,是 K8s 用于安裝組件(軟件包:chart)的工具
- APP Hub
https://developer.aliyun.com/hub
備注:在開放云原生應(yīng)用中心當(dāng)中,所有默認(rèn)的 Helm Charts(Helm 格式的應(yīng)用),都定時(shí)同步自 Helm Hub 北美官方站并托管在 Github 上。在這個(gè)過程中,云原生應(yīng)用中心會(huì)自動(dòng)對(duì)同步過來的所有 Charts 進(jìn)行“本地化”操作。
- CFSSL
https://github.com/cloudflare/cfssl
備注:CFSSL 是開源的一款 PKI/TLS 工具,常用于 K8s 證書制作
- aliyun 私有鏡像倉庫
https://cr.console.aliyun.com/aliyun
備注:推出的鏡像倉庫,建議采用企業(yè)版
- 云效配置鏡像倉庫
https://cn.aliyun.com/product/yunxiao
備注:云效企業(yè)設(shè)置,配置支持從阿里云私有鏡像倉庫拉取鏡像
- Harbor 鏡像倉庫
https://goharbor.io
備注:開源免費(fèi)的存儲(chǔ)和分發(fā)Docker鏡像的企業(yè)級(jí)Registry服務(wù)器
組件
- kube-apiserver(Master)
https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/
備注:在 generic server 上封裝的一層官方默認(rèn)的 apiserver(static pod)
- etcd(Master)
https://etcd.io
備注:類 zk 基于 Raft 協(xié)議的實(shí)現(xiàn),啟動(dòng)進(jìn)程
- Kube-scheduler(Master)
https://kubernetes.io/docs/reference/command-line-tools-reference/kube-scheduler/
備注:負(fù)責(zé) pod 分布到 Node 上的調(diào)度器 (static pod)
- kube-controller-manager(Master)
https://kubernetes.io/docs/reference/command-line-tools-reference/kube-controller-manager/
備注:Deployment 等基礎(chǔ)對(duì)象的控制器 (static pod)
- cloud-controller-manager(Master)
https://kubernetes.io/docs/reference/command-line-tools-reference/cloud-controller-manager/
備注:用于云資源使用的控制器,是云服務(wù)進(jìn)行集成的控制器 (Daemonset)
- kubelet(Node)
https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/
備注:與 Master 通信,對(duì) worker(Node) 進(jìn)行生命周期管理
- kube-proxy(Node)
https://kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/
備注:節(jié)點(diǎn)上運(yùn)行的網(wǎng)絡(luò)代理 (Daemonset)
- containner runtime(Node)
備注:CRI 接口
- DNS
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
備注:aliyun容器服務(wù)采用 CoreDNS(deployment)
- Ingress controller
https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/
備注:aliyun容器服務(wù)采用nginx ingress controller, 可以作為 https 服務(wù)的統(tǒng)一路由(deployment)
- Heapster & influxdb
備注:監(jiān)控?cái)?shù)據(jù)采集與存儲(chǔ)用的時(shí)序數(shù)據(jù)庫(Deployment)
- Federation
https://kubernetes.io/docs/concepts/cluster-administration/federation/
備注:集群聯(lián)盟,實(shí)現(xiàn)高可用,同步資源等
- kube-flannel
備注:官方網(wǎng)絡(luò)插件,aliyun 另外提供了自己開發(fā)的 Terway 組件(daemonset)
- logtail
https://help.aliyun.com/document_detail/28979.html?spm=a2c4g.11186623.6.595.439d7218wQhzsH
備注:aliyun 日志采集組件 (daemonset)
基礎(chǔ)對(duì)象
- POD
http://docs.kubernetes.org.cn/312.html 容器組,運(yùn)行應(yīng)用容器基本單位,kubectl get pods
- Node
http://docs.kubernetes.org.cn/304.html集群節(jié)點(diǎn)服務(wù)器,Kubernetes中的工作節(jié)點(diǎn)。
- NameSpace
http://docs.kubernetes.org.cn/242.html備注:用以區(qū)分和隔離應(yīng)用
- Deployement
http://docs.kubernetes.org.cn/317.html備注:無狀態(tài)部署,最常用部署配置
- Daemonset
https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
備注:類似守護(hù)進(jìn)程
- StatefulSet
http://docs.kubernetes.org.cn/443.html
備注:有狀態(tài)部署
- Job & CronJob
https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
備注:調(diào)度任務(wù)
- Static POD
https://kubernetes.io/docs/tasks/configure-pod-container/static-pod/
備注:靜態(tài) pod 配置,yaml 位于 Master
- HPA
https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/
備注:水平伸縮調(diào)度器
- Service
https://kubernetes.io/docs/concepts/services-networking/service/
備注:服務(wù)暴露配置,包括 Cluster,NodePort,SLB 等
- Ingress
https://www.kubernetes.org.cn/1885.html
備注:路由,阿里云默認(rèn)提供 nginx ingress
- Secret
https://kubernetes.io/docs/concepts/configuration/secret/
備注:保密字典,包括 tls,私有倉庫密鑰,Opaque 幾種
- ServiceAccount
https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/
備注:用于資源對(duì)象的賬號(hào),比如給一個(gè) Namespace 授予某私有鏡像訪問權(quán)限
- RBAC
https://kubernetes.io/docs/reference/access-authn-authz/rbac/
備注:K8s 基于角色的訪問控制,role,rolebinding
- Volume
https://kubernetes.io/docs/concepts/storage/volumes/
備注:映射磁盤
- Storge Class
https://kubernetes.io/docs/concepts/storage/storage-classes/
- CustomResourceDefinition
備注:自定義擴(kuò)展資源
插件擴(kuò)展
- CNI(Falnnel/Terway)
https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/
備注:容器網(wǎng)絡(luò)接口
- FlexVolume
https://github.com/fstab/cifs
備注:開源 Volume 實(shí)現(xiàn)插件,阿里云使用中
- Cloud Provider
備注:云服務(wù)供應(yīng)接口
容器服務(wù)優(yōu)化-最佳實(shí)踐
- Master 選型及磁盤規(guī)格
[1] https://yq.aliyun.com/articles/599169?spm=5176.11065265.1996646101.searchclickresult.7bea1a8bgCTYH7
[2] https://yq.aliyun.com/articles/621108?
- 網(wǎng)絡(luò)選擇
https://yq.aliyun.com/articles/594943?
- Worker 節(jié)點(diǎn)選型
https://yq.aliyun.com/articles/602932?spm=a2c4e
-
Ingress Controller 獨(dú)立部署
-
Master 變配
https://help.aliyun.com/document_detail/123661.html?spm=5176.10695662.1996646101.searchclickresult.20d0328c6WG7jc
-
節(jié)點(diǎn)變配或重啟、摘除、加入
-
基礎(chǔ)鏡像開發(fā)
-
Service 與 SLB 結(jié)合
-
集群審計(jì)
https://help.aliyun.com/document_detail/91406.html?spm=5176.10695662.1996646101.searchclickresult.45266c92kGHQrP
- Deployment實(shí)現(xiàn)分批發(fā)布
- StatefulSet 分批發(fā)布
https://yq.aliyun.com/articles/622898?spm=a2c4e.11155435.0.0.1b8e3312bSGmSe
- 堡壘機(jī)上按照應(yīng)用設(shè)置權(quán)限
https://yq.aliyun.com/articles/715809
- Pod 均勻分布部署
https://yq.aliyun.com/articles/715808
- 應(yīng)用優(yōu)雅下線,優(yōu)雅退出
- ApiServer 訪問
- 監(jiān)控
服務(wù)治理
- Istio
https://istio.io
備注:當(dāng)前最流行的網(wǎng)格服務(wù)架構(gòu),aliyun 支持
- Linkerd
https://linkerd.io/2/overview/
備注:最早提出網(wǎng)格服務(wù)公司的產(chǎn)品
- 云效
https://www.aliyun.com/product/yunxiao
備注:支持容器服務(wù) K8s 的 CI/CD 阿里云上產(chǎn)
- Jenkins
https://jenkins.io/zh/
備注:著名的最常用的 CI/CD 產(chǎn)品,容器服務(wù)由一鍵安裝產(chǎn)品
云原生技術(shù)公開課
https://edu.aliyun.com/roadmap/cloudnative
備注:阿里云聯(lián)合 CNCF (云原生計(jì)算基金會(huì))共同開發(fā)了本套云原生技術(shù)公開課,課程全程免費(fèi)!
『本文轉(zhuǎn)載自阿里云開發(fā)者社區(qū)』
原文鏈接:
https://developer.aliyun.com/article/715805?utm_content=g_1000073582
總結(jié)
以上是生活随笔為你收集整理的K8s 学习者绝对不能错过的最全知识图谱(内含 58个知识点链接)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 云原生生态周报 Vol. 16 | CN
- 下一篇: 从求生存到修体系,我在阿里找到了技术人的