本文主要是介绍dial tcp 192.168.0.190:443: connect: connection refused,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1、场景
用nerdctl登录镜像仓库192.168.0.190(Harbor),报错
ERRO[0006] failed to call tryLoginWithRegHost error="failed to call rh.Client.Do: Get \"https://192.168.0.190/v2/\": dial tcp 192.168.0.190:443: connect: connection refused" i=0
FATA[0006] failed to call rh.Client.Do: Get "https://192.168.0.190/v2/": dial tcp 192.168.0.190:443: connect: connection refused
2、解决办法
由于机器装了docker和containerd
2.1 所有的Kubernetes节点的Docke,都需要添加insecure-registries配置:
master节点:
node节点:
2.2 如果Kubernetes集群采用的是Containerd作为的Runtime,配置insecure-registry只需要在
Containerd配置文件的mirrors下添加自己的镜像仓库地址即可
endpoint= ["http://192.168.0.190"]
3、创建hosts.toml文件
[host."http://192.168.0.190"]
capabilities = ["pull", "resolve","push"]
skip_verify = true
4、验证
nerdctl login 192.168.0.190
这篇关于dial tcp 192.168.0.190:443: connect: connection refused的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!