现象:

自建harbor默认用http,k8s是用rke2搭建的,默认用的containerd,部署业务的时候拉去镜像失败,报

http: server gave HTTP response to HTTPS client 错误

解决:

rke2的registry.yaml 增加harbor的http mirror,参照

https://docs.rke2.io/zh/install/containerd_registry_configuration

重启rke2-server or rke2-agent


refrence:

https://stackoverflow.com/questions/72419513/how-to-pull-docker-image-from-a-insecure-private-registry-with-latest-kubernetes