temp
This commit is contained in:
19
k8s/xiongxiao.me/config/master-token.md
Normal file
19
k8s/xiongxiao.me/config/master-token.md
Normal file
@@ -0,0 +1,19 @@
|
||||
K1035ea36d4925cfd0a7f7938fb3eff1225e458c1aee4fb99bda40bb95f529913bf::server:03e3ef7d17dadc2471b0f2369248250d
|
||||
|
||||
|
||||
# Agent 节点安装命令
|
||||
curl -sfL https://rancher-mirror.rancher.cn/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn K3S_URL=https://light.xiongxiao.me:6443 K3S_TOKEN=K1035ea36d4925cfd0a7f7938fb3eff1225e458c1aee4fb99bda40bb95f529913bf::server:03e3ef7d17dadc2471b0f2369248250d sh -
|
||||
|
||||
会输出类似
|
||||
[INFO] systemd: Enabling k3s-agent unit
|
||||
Created symlink /etc/systemd/system/multi-user.target.wants/k3s-agent.service → /etc/systemd/system/k3s-agent.service.
|
||||
[INFO] systemd: Starting k3s-agent
|
||||
|
||||
|
||||
|
||||
## 设置label
|
||||
|
||||
kubectl label nodes vm-32-6-ubuntu machine=library --overwrite
|
||||
|
||||
删除label
|
||||
kubectl label nodes vm-32-6-ubuntu machine- --overwrite
|
||||
78
k8s/xiongxiao.me/config/registry.md
Normal file
78
k8s/xiongxiao.me/config/registry.md
Normal file
@@ -0,0 +1,78 @@
|
||||
sudo vim /etc/rancher/k3s/registries.yaml
|
||||
|
||||
```yaml
|
||||
mirrors:
|
||||
docker.io:
|
||||
endpoint:
|
||||
- "https://docker.1ms.run"
|
||||
- "https://docker.m.daocloud.io"
|
||||
- "https://docker.1panel.live"
|
||||
- "https://docker-0.unsee.tech"
|
||||
- "https://dytt.online"
|
||||
- "https://lispy.org"
|
||||
- "https://docker.xiaogenban1993.com"
|
||||
- "https://666860.xyz"
|
||||
- "https://hub.rat.dev"
|
||||
- "https://demo.52013120.xyz"
|
||||
- "https://proxy.vvvv.ee"
|
||||
- "https://registry.cyou"
|
||||
- "http://hub-mirror.c.163.com"
|
||||
|
||||
# rancher 镜像加速
|
||||
"rancher":
|
||||
endpoint:
|
||||
- "https://docker.1ms.run/rancher"
|
||||
|
||||
configs:
|
||||
"docker.1ms.run":
|
||||
tls:
|
||||
insecure_skip_verify: true
|
||||
|
||||
```
|
||||
|
||||
```bash
|
||||
# Master 节点重启 k3s
|
||||
sudo systemctl restart k3s
|
||||
|
||||
# Worker 节点重启 k3s-agent
|
||||
sudo systemctl restart k3s-agent
|
||||
```
|
||||
|
||||
## container ctr
|
||||
|
||||
```bash
|
||||
vim /etc/containerd/config.toml
|
||||
|
||||
|
||||
[plugins."io.containerd.grpc.v1.cri".registry]
|
||||
[plugins."io.containerd.grpc.v1.cri".registry.mirrors]
|
||||
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
|
||||
endpoint = [
|
||||
"https://docker.1panel.live",
|
||||
"https://docker.1ms.run",
|
||||
"https://dytt.online",
|
||||
"https://docker-0.unsee.tech",
|
||||
"https://lispy.org",
|
||||
"https://docker.xiaogenban1993.com",
|
||||
"https://666860.xyz",
|
||||
"https://hub.rat.dev",
|
||||
"https://docker.m.daocloud.io",
|
||||
"https://demo.52013120.xyz",
|
||||
"https://proxy.vvvv.ee",
|
||||
"https://registry.cyou"
|
||||
]
|
||||
|
||||
|
||||
sudo systemctl restart containerd
|
||||
sudo ctr image pull docker.io/library/verdaccio:latest
|
||||
|
||||
# K3s 使用 k8s.io 命名空间
|
||||
sudo ctr -n k8s.io images pull docker.m.daocloud.io/rancher/mirrored-pause:3.6
|
||||
|
||||
sudo ctr -n k8s.io images tag docker.m.daocloud.io/rancher/mirrored-pause:3.6 docker.io/rancher/mirrored-pause:3.6
|
||||
|
||||
sudo ctr -n k8s.io images delete docker.m.daocloud.io/rancher/mirrored-pause:3.6
|
||||
|
||||
# 查看镜像
|
||||
sudo ctr -n k8s.io images ls | grep pause
|
||||
```
|
||||
Reference in New Issue
Block a user