簡介: 本機上運作k8s的各種不同軟體的對比和結構圖
1. 本地k8s運作總結
1) 運作軟體
(1) minikube kind k3s
(2) MicroK8S
(3) K0S
(4) Docker Desktop
(5) OpenShift
2) 各種系統主要圖
(1) k3s
(2) k0s
(3) MiniKube
(4) Kind
(5) K8s
(6) Docker Desktop k8s
(7) OpenShit CRC
https://www.yuque.com/wushifengcn/kb/fb9tb8
https://developer.aliyun.com/article/881518
1 本地k8s運作總結
本機上運作k8s的各種不同軟體的對比和結構圖
2 運作軟體
3 minikube kind k3s
https://www.jambit.com/en/latest-info/toilet-papers/minikube-vs-kind-vs-k3s-which-local-kubernetes-cluster-should-i-use/
4 MicroK8S
https://microk8s.io/compare
MICROK8S | K3S | MINIKUBE | |
CNCF certified | Yes | Yes | Yes |
Vanilla Kubernetes | Yes | – | Yes |
Architecture support | x86, ARM64, s390x | x86, ARM64, ARMhf | x86, ARM64, ARMv7, ppc64, s390x |
Enterprise support | Yes | Yes | – |
Single-node support | Yes | Yes | Yes |
Multi-node cluster support | Yes | Yes | – |
Automatic high availability | Yes | – | – |
Automatic updates | Yes | – | – |
Memory requirements | 540 MB | 512 MB | 2 GB |
Add-on functionality | Yes | – | Yes |
Container runtime | containerd, kata | CRI-O | Docker, containerd, CRI-O |
Networking | Calico, Cilium, CoreDNS, Traefik, NGINX, Ambassador, Multus, MetalLB | Flannel, CoreDNS, Traefik, Canal, Klipper | Calico, Cilium, Flannel, ingress, DNS, Kindnet |
Storage | Hostpath storage, OpenEBS, Ceph | Hostpath storage, Longhorn | Hostpath storage |
GPU acceleration | Yes | – | Yes |
5 K0S
https://computingforgeeks.com/k0s-vs-k3s-vs-microk8s-kubernetes-distributions-comparison/
Feature | k0s | k3s | microk8s |
Licensing | Completely Open Source | Completely Open Source | Completely Open Source |
Packaging | k0s is distributed as a single binary with minimal host OS dependencies besides the host OS kernel | Packaged as a single binary. | MicroK8s is a Kubernetes cluster delivered as a single snap package. |
Kubernetes Versions | v1.20 and v1.21 | Latest release updates Kubernetes to v1.22.1 | Kubernetes v1.22, v1.21 |
Container Runtime | ContainerD (default) | ContainerD (default) | ContainerD is the container runtime used by MicroK8s |
Supported Host OS | Linux (kernel v3.10 or newer) Windows Server 2019 (experimental) | K3s is expected to work on most modern Linux systems | Windows 10, Linux, macOS |
Control Plane Storage Options | In-Cluster Elastic Etcd with TLS (default), In-Cluster SQLite (default for single node), External PostgreSQL, External MySQL | sqlite3 is the default storage mechanism. etcd3, MySQL, Postgres also still available | MicroK8s supports high availability using Dqlite as the datastore for cluster state. |
Built-In Security Features | RBAC, Support OpenID Providers, Pod Security Policies, Network Policies, Micro VM Runtimes (coming soon), Control Plane Isolation | Secure by default with reasonable defaults for lightweight environments | Secure by default with reasonable defaults for lightweight environments |
Supported CNI Providers | Kube-Router (default), Calico or Custom | K3s will run with flannel by default as the CNI, using VXLAN as the default backend. Custom supported as well | Flanneld runs if ha-cluster is not enabled. If ha-cluster is enabled, calico is run instead. |
Supported Machine Architectures | x86-64, ARM64, ARMv7 | Latest release supports x86_64, ARMv7, and ARM64 | x86_64, ARMv7, and ARM64 |
Backing Company | Mirantis | Rancher | Canonical |
Addons | Minimum Addons | Traefik, Helm,LB | Dashboard, Ingress, DNS, and more |
6 Docker Desktop
https://docs.docker.com/desktop/kubernetes/
If you have Docker Desktop, go to preferences, go to the Kubernetes tab, and click Enable Kubernetes.
7 OpenShift
CodeReady Containers (CRC) manages a local OpenShift 4.x cluster optimized for testing and development purposes. https://github.com/code-ready/crc
Minishift helps you run OpenShift 3.x clusters locally by running a single-node OpenShift cluster inside a virtual machine (VM). https://github.com/minishift/minishift
8 各種系統主要圖
9 k3s
https://docs.rancher.cn/docs/k3s/architecture/_index
單節點k3s server的架構
K3s高可用架構
一個高可用 K3s 叢集由以下幾個部分組成:
- K3s Server 節點:兩個或更多的server節點将為 Kubernetes API 提供服務并運作其他 control-plane 服務
- 外部資料庫:與單節點 k3s 設定中使用的嵌入式 SQLite 資料存儲相反,高可用 K3s 需要挂載一個external database外部資料庫作為資料存儲的媒介。
10 k0s
https://docs.k0sproject.io/v1.23.5+k0s.0/architecture/