# 安装 master ```sh ## 1. 安装 k3s curl -sfL https://get.k3s.io | sh - sudo cat /var/lib/rancher/k3s/server/node-token ``` ## 2. 安装 node ```sh 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. 删除 ```sh ## master 节点上执行 sudo /usr/local/bin/k3s-uninstall.sh ## node 节点上执行 sudo /usr/local/bin/k3s-agent-uninstall.sh ``` ## 4. 这是 role ``` kubectl label nodes role= --overwrite ``` ## 部署 如何在某一个节点vm-32-6-ubuntu部署verdaccio ```sh # services kubectl apply -f verdaccio-deployment.yaml # ip kubectl apply -f verdaccio-services.yaml # 查看pod kubectl get pods -o wide ```