k8s登录harbor报错:Error response from daemon: Get https://registry-1.docker.io/v2/:
harbor
Harbor 是一个开源的容器镜像仓库,用于存储和管理 Docker 镜像和其他容器镜像。 * 容器镜像仓库、存储和管理 Docker 镜像和其他容器镜像 * 有什么特点:支持多种镜像格式、易于使用、安全性和访问控制
项目地址:https://gitcode.com/gh_mirrors/ha/harbor
免费下载资源
·
[root@k8s-node02 ~]# docker login 10.168.180.105:1180
Username: admin
Password:
Error response from daemon: Get http://10.168.180.105:1180/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
解决方案:
1.打开终端,su root 输入密码
2.打开 vim /etc/docker/daemon.json(若没有自行创建)
3.写入:
[root@k8s-node02 ~]# cat /etc/docker/daemon.json
{
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},"insecure-registries":[
"10.168.180.105:1180"
]
}
[root@k8s-node02 ~]#
"insecure-registries":[
"10.168.180.105:1180"
]
4.重启一下docker:
[root@topcheer ~]# systemctl daemon-reload #加载配置文件
[root@topcheer ~]# systemctl restart docker #重启
[root@topcheer ~]#
成功解决
[root@k8s-node02 ~]# docker login 10.168.180.105:1180
Username: admin
Password:
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
[root@k8s-node02 ~]# curl http://10.168.180.105:1180
<!doctype html>
<html>
<head>
<meta charset="utf-8">
GitHub 加速计划 / ha / harbor
23.24 K
4.68 K
下载
Harbor 是一个开源的容器镜像仓库,用于存储和管理 Docker 镜像和其他容器镜像。 * 容器镜像仓库、存储和管理 Docker 镜像和其他容器镜像 * 有什么特点:支持多种镜像格式、易于使用、安全性和访问控制
最近提交(Master分支:2 个月前 )
9e55afbb
pull image from registry.goharbor.io instead of dockerhub
Update testcase to support Docker Image Can Be Pulled With Credential
Change gitlab project name when user changed.
Update permissions count and permission count total
Change webhook_endpoint_ui
Signed-off-by: stonezdj <stone.zhang@broadcom.com>
Co-authored-by: Wang Yan <wangyan@vmware.com> 10 天前
3dbfd422
Signed-off-by: wang yan <wangyan@vmware.com> 10 天前
更多推荐
已为社区贡献1条内容
所有评论(0)