赞
踩
https://docs.k3s.io/installation
1,首先安装 containerd
sudo apt-get install containerd
sudo systemctl enable containerd # 开机自启
2,然后树莓派需要修改一些额外的配置文件,然后重启电脑
sudo touch /boot/cmdline.txt
sudo echo "cgroup_memory=1 cgroup_enable=memory" > /boot/cmdline.txt
3,最后安装 k3s
国内用户安装
curl -sfL https://rancher-mirror.oss-cn-beijing.aliyuncs.com/k3s/k3s-install.sh | K3S_KUBECONFIG_MODE="644" INSTALL_K3S_MIRROR=cn sh -
or
官方的方法安装
curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" INSTALL_K3S_EXEC="server" sh -s -
sudo systemctl status k3s
创建文件/etc/rancher/k3s/registries.yaml
, 并将如下内容复制到该文件中,然后执行 sudo systemctl force-reload k3s
mirrors:
docker.io:
endpoint:
- "https://registry-1.docker.io"
configs:
"registry-1.docker.io":
auth:
username: wph1720637550
password: xxxxx
1.不能看日志(kubectl logs -f podName)
Error from server: Get "https://192.168.137.107:10250/containerLogs/default/mysql-679d847c79-9rzr6/mysql?follow=true": EOF
解决办法:
关闭防火墙
or
https://zhuanlan.zhihu.com/p/545327043
可能需要配置containered代理之类的
or
如果还是报看不了日志的错误,考虑下重装k3s
/usr/local/bin/k3s-uninstall.sh
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。