简介: 本机上运行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
4 MicroK8S
|
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/