update
This commit is contained in:
@@ -21,3 +21,11 @@ kubectl delete job -n kube-system helm-install-traefik helm-install-traefik-crd
|
|||||||
# 安装 Traefik CRD
|
# 安装 Traefik CRD
|
||||||
kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v3.0/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml
|
kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v3.0/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## use devcontext
|
||||||
|
|
||||||
|
```sh
|
||||||
|
kubectl config use-context dev-context
|
||||||
|
# ls context
|
||||||
|
kubectl config use-context kevisual-context
|
||||||
|
```
|
||||||
@@ -1,113 +1 @@
|
|||||||
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'
|
|
||||||
|
|
||||||
"registry.k8s.io":
|
|
||||||
endpoint:
|
|
||||||
- 'https://k8s.m.daocloud.io'
|
|
||||||
- 'https://docker.m.daocloud.io'
|
|
||||||
# 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
|
|
||||||
|
|
||||||
|
|
||||||
disabled_plugins = ["cri"]
|
|
||||||
|
|
||||||
[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.1ms.run",
|
|
||||||
"https://docker.m.daocloud.io",
|
|
||||||
"https://docker.1panel.live",
|
|
||||||
"https://dytt.online",
|
|
||||||
"https://docker-0.unsee.tech",
|
|
||||||
"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"
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
# [plugins."io.containerd.grpc.v1.cri".registry.mirrors."registry.k8s.io"]
|
|
||||||
# endpoint = [
|
|
||||||
# "https://k8s.m.daocloud.io"
|
|
||||||
# "https://docker.m.daocloud.io",
|
|
||||||
# ]
|
|
||||||
```
|
|
||||||
|
|
||||||
# 重启 containerd
|
|
||||||
|
|
||||||
```bash
|
|
||||||
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
|
|
||||||
```
|
|
||||||
|
|
||||||
## 安装 cluster-api-controller
|
|
||||||
|
|
||||||
```bash
|
|
||||||
registry.k8s.io/cluster-api/cluster-api-controller:v1.10.6
|
|
||||||
|
|
||||||
sudo ctr image pull registry.k8s.io/cluster-api/cluster-api-controller:v1.10.6
|
|
||||||
|
|
||||||
# proxy 镜像
|
|
||||||
sudo ctr -n k8s.io image pull k8s.m.daocloud.io/cluster-api/cluster-api-controller:v1.10.6
|
|
||||||
|
|
||||||
# 打标签
|
|
||||||
sudo ctr -n k8s.io images tag k8s.m.daocloud.io/cluster-api/cluster-api-controller:v1.10.6 registry.k8s.io/cluster-api/cluster-api-controller:v1.10.6
|
|
||||||
|
|
||||||
# 删除镜像
|
|
||||||
sudo ctr -n k8s.io images delete k8s.m.daocloud.io/cluster-api/cluster-api-controller:v1.10.6
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user