generated from bing/readnotes
feat 修改k8s镜像仓库
This commit is contained in:
parent
c740258b24
commit
5bc94f98c2
|
@ -41,5 +41,7 @@ kubectl taint nodes --all node-role.kubernetes.io/control-plane-
|
||||||
### 安装calico
|
### 安装calico
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
|
# kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
|
||||||
|
kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.25.0/manifests/tigera-operator.yaml
|
||||||
|
kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.25.0/manifests/custom-resources.yaml
|
||||||
```
|
```
|
|
@ -2,7 +2,7 @@
|
||||||
HTTPS_PROXY=$1
|
HTTPS_PROXY=$1
|
||||||
IMAGE_REGISTRY=$2
|
IMAGE_REGISTRY=$2
|
||||||
IMAGE_REGISTRY_USER=$3
|
IMAGE_REGISTRY_USER=$3
|
||||||
IMAGES=$(kubeadm config images list | grep k8s.gcr.io)
|
IMAGES=$(kubeadm config images list | grep registry.k8s.io)
|
||||||
for IMAGE in ${IMAGES[@]}
|
for IMAGE in ${IMAGES[@]}
|
||||||
do
|
do
|
||||||
echo "pull image ${IMAGE}"
|
echo "pull image ${IMAGE}"
|
||||||
|
@ -12,4 +12,4 @@ do
|
||||||
ctr images push -k -u ${IMAGE_REGISTRY_USER} ${IMAGE_REGISTRY}/${IMAGE_NAME}
|
ctr images push -k -u ${IMAGE_REGISTRY_USER} ${IMAGE_REGISTRY}/${IMAGE_NAME}
|
||||||
# ctr images rm ${IMAGE}
|
# ctr images rm ${IMAGE}
|
||||||
done
|
done
|
||||||
#192.168.0.144:1080 ccr.ccs.tencentyun.com/kgcrio 100004225373:Hello2022
|
#192.168.0.144:1080 ccr.ccs.tencentyun.com/kgcrio 100004225373
|
Loading…
Reference in New Issue