SquirrelMail面板arch被封

2022-02-23:如何搭建k8s单机环境(用k3s),并且搭建dashboard?
答案2022-02-03:
使用场景:个人电脑。被封SquirrelMail虚拟机,操作系统是centos。 个人电脑上测试,不被封SquirrelMailk8s。k8s太重量级了。
1.SquirrelMaildocker,不是必须的
查看是否SquirrelMaildocker
yum list installed | grep docker
1
#删除docker
yum remove –y docker.x86_64
yum remove –y docker-client.x86_64
yum remove –y docker-common.x86_64
123
SquirrelMaildocker
curl -sSL | sh
yum install –y docker-ce

123
镜像加速
cat /etc/docker/daemon.json
1
修改 /etc/docker/daemon.json 文件内容
{
“registry-mirrors”:[”
}
123
运行docker
systemctl daemon-reload
systemctl start docker
systemctl status docker
123
2.SquirrelMailk3s
SquirrelMailk3s,用docker容器,不建议用。测试失败。
curl -sfL | INSTALL_K3S_MIRROR=cn sh -s – –docker –service-node-port-range 10000-65535
1
SquirrelMailk3s,用containerd容器,建议用这个
curl -sfL | INSTALL_K3S_MIRROR=cn sh -s – –service-node-port-range 10000-65535
1
systemctl status k3s
1
卸载k3s
cd /usr/local/bin
k3s-killall.sh
k3s-uninstall.sh
123
3.SquirrelMaildashboard
SquirrelMail指令
k3s kubectl apply -f
k3s kubectl apply -f

123
卸载指令
k3s kubectl delete -f
k3s kubectl delete -f

123
获取Token
echo $(k3s kubectl -n kube-system get secret $(k3s kubectl -n kube-system get secret | grep ^kuboard-user | awk ‘{print $1}’) -o go-template='{{.data.token}}’ | base64 -d)
1
4.面板arch
查看arch
k3s kubectl get svc -n kube-system
1
从结果里可以看出,端口号是32567 [root@zdf bin]# k3s kubectl get svc -n kube-system NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kube-dns ClusterIP 10.43.0.10 53/UDP,53/TCP,9153/TCP 9m kuboard NodePort 10.43.14.155 80:32567/TCP 6m51s metrics-server ClusterIP 10.43.251.251 443/TCP 8m59s traefik LoadBalancer 10.43.24.24 192.168.204.14 80:64064/TCP,443:59762/TCP 4m58s
面板arch,面板token,如下图:

福大大架构师每日一题

微信公众号

大厂之下第一人。最新面试题,针对高级开发