try k3s on raspberry
Table of Contents
What is k3s
K3s is a fully compliant Kubernetes distribution with the following enhancements:
K8S 的 mini 版本, 用来边缘计算
- Distributed as a single binary or minimal container image. -- 以一个迷你的二进制包或容器镜像包分发
- Lightweight datastore based on sqlite3 as the default storage backend. etcd3, MySQL, and Postgres are also available. -- 基于 sqlite 的轻量级数据存储
- Wrapped in simple launcher that handles a lot of the complexity of TLS and options.
- Secure by default with reasonable defaults for lightweight environments.
- Operation of all Kubernetes control plane components is encapsulated in a single binary and process, allowing K3s to automate and manage complex cluster operations like distributing certificates. -- 将 k8s 控制平台的多个组件封装到一个二进制包中, 一个进程中, k3s 可以自动化管理复杂的集群操作, 例如分发证书
- External dependencies have been minimized; the only requirements are a modern kernel and cgroup mounts. -- 外部依赖最小化, 唯一的需求是现代化的内核和 cgroup mounts
- Packages the required dependencies for easy "batteries-included" cluster creation:
- containerd / cri-dockerd container runtime (CRI)
- Flannel Container Network Interface (CNI)
- CoreDNS Cluster DNS
- Traefik Ingress controller
- ServiceLB Load-Balancer controller
- Kube-router Network Policy controller
- Local-path-provisioner Persistent Volume controller
- Spegel distributed container image registry mirror
- Host utilities (iptables, socat, etc)
Quick start
curl -sfL https://get.k3s.io | sh -
[INFO] Finding release for channel stable
curl: (52) Empty reply from server
[INFO] Using v1.30.5+k3s1 as release
[INFO] Downloading hash https://github.com/k3s-io/k3s/releases/download/v1.30.5+k3s1/sha256sum-arm.txt
[INFO] Skipping binary downloaded, installed k3s matches hash
[INFO] Finding available k3s-selinux versions
sh: 416: [: k3s-selinux-1.6-1.el9.noarch.rpm: unexpected operator
[INFO] Skipping /usr/local/bin/kubectl symlink to k3s, already exists
[INFO] Skipping /usr/local/bin/crictl symlink to k3s, already exists
[INFO] Skipping /usr/local/bin/ctr symlink to k3s, already exists
[INFO] Creating killall script /usr/local/bin/k3s-killall.sh
[INFO] Creating uninstall script /usr/local/bin/k3s-uninstall.sh
[INFO] env: Creating environment file /etc/systemd/system/k3s.service.env
[INFO] systemd: Creating service file /etc/systemd/system/k3s.service
[INFO] systemd: Enabling k3s unit
Created symlink /etc/systemd/system/multi-user.target.wants/k3s.service → /etc/systemd/system/k3s.service.
[INFO] No change detected so skipping service start
$ sudo k3s kubectl get node
NAME STATUS ROLES AGE VERSION
raspberrypi Ready control-plane,master 91s v1.30.5+k3s1
``
Comments |0|
Category: 似水流年