769 B
769 B
安装 master
## 1. 安装 k3s
curl -sfL https://get.k3s.io | sh -
sudo cat /var/lib/rancher/k3s/server/node-token
2. 安装 node
curl -sfL https://rancher-mirror.rancher.cn/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn K3S_URL=https://myserver:6443 K3S_TOKEN=mynodetoken sh -
3. 删除
## master 节点上执行
sudo /usr/local/bin/k3s-uninstall.sh
## node 节点上执行
sudo /usr/local/bin/k3s-agent-uninstall.sh
4. 这是 role
kubectl label nodes <node-name> role=<value> --overwrite
部署
如何在某一个节点vm-32-6-ubuntu部署verdaccio
# services
kubectl apply -f verdaccio-deployment.yaml
# ip
kubectl apply -f verdaccio-services.yaml
# 查看pod
kubectl get pods -o wide