k3s 安装使用
安装
在线脚本安装
curl -sfL https://rancher-mirror.rancher.cn/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn sh -
二进制执行文件启动
sudo k3s server & # k3s --data-dir 或者 软链接到其他目录 方便排查管理
# Kubeconfig is written to /etc/rancher/k3s/k3s.yaml
sudo k3s kubectl get node
# On a different node run the below command.
# NODE_TOKEN comes from /var/lib/rancher/k3s/server/node-token on your server
sudo k3s agent --server https://myserver:6443 --token ${NODE_TOKEN}
使用
设置别名来使用
**********************!!!PROTECTION POLICY!!!**********************
Waiting For The Next Deployment, Maybe It Will Be Displayed After That.
升级
先用k3s自带工具清理k3s状态
k3s-killall.sh