This commit is contained in:
2025-11-26 15:44:15 +08:00
parent 1cd698ed64
commit 2418891634
42 changed files with 3715 additions and 5 deletions

View File

@@ -0,0 +1,47 @@
# 安装 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 <node-name> role=<value> --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
```