[root@form .ssl]# systemctl daemon-reload
[root@form .ssl]# systemctl restart k3s
[root@form .ssl]# crictl pull www.myharbor.cn/myimages/tomcat:v1
E0430 14:37:10.927836 94081 remote_image.go:171] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"www.myharbor.cn/myimages/tomcat:v1\": failed to resolve reference \"www.myharbor.cn/myimages/tomcat:v1\": failed to do request: Head \"https://www.myharbor.cn/v2/myimages/tomcat/manifests/v1\": x509: certificate is not valid for any names, but wanted to match www.myharbor.cn" image="www.myharbor.cn/myimages/tomcat:v1"
FATA[0000] pulling image: rpc error: code = Unknown desc = failed to pull and unpack image "www.myharbor.cn/myimages/tomcat:v1": failed to resolve reference "www.myharbor.cn/myimages/tomcat:v1": failed to do request: Head "https://www.myharbor.cn/v2/myimages/tomcat/manifests/v1": x509: certificate is not valid for any names, but wanted to match www.myharbor.cn
[root@form .ssl]#
[root@form .ssl]# cat /etc/rancher/k3s/registries.yaml
mirrors:
# "docker.io":
# endpoint:
# - "https://docker.mirrors.ustc.edu.cn"
# - "https://registry-1.docker.io"
"192.168.65.146":
endpoint:
- "http://192.168.65.146"
# "www.myharbor.cn"":
# endpoint:
# - "https://www.myharbor.cn"
configs:
"192.168.65.146":
auth:
username: admin
password: Harbor60207
# "www.myharbor.cn":
# auth:
# username: admin
# password: Harbor60207
# tls:
# ca_file: /root/.ssl/ca.crt # path to the ca file used in the registry
使用了http有认证和https自签都没有成功