K3s无法从私有镜像仓库拉取镜像

[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自签都没有成功

请重新编辑下registries.yaml文件的格式,以当前的格式很难看出配置是否有问题。
使用自签名证书的私有镜像仓库可以参考官网配置,指向对应的证书及ca文件路径,或者使用 insecure_skip_verify 选择跳过tls验证

解决了,我重新安装了一下harbor,正常了