• k8s登录harbor报错:Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request cance


    [root@k8s-node02 ~]# docker login 192.168.180.105:1180
    Username: admin
    Password:
    Error response from daemon: Get http://192.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":[
        "192.168.180.105:1180"
      ]
    }
    [root@k8s-node02 ~]#

    "insecure-registries":[
    "192.168.180.105:1180"
    ]

    4.重启一下docker:

    [root@topcheer ~]# systemctl daemon-reload  #加载配置文件
    [root@topcheer ~]# systemctl restart docker  #重启
    [root@topcheer ~]#

    成功解决

    [root@k8s-node02 ~]# docker login 192.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://192.168.180.105:1180
    <!doctype html>
    <html>
    
    <head>
        <meta charset="utf-8">
  • 相关阅读:
    eclipse报错:发现了以元素 'd:skin' 开头的无效内容。此处不应含有子元素
    深入解析_Android的自定义布局
    RSA算法加密解密
    android版本
    TabHost+RadioGroup搭建基础布局
    android横竖屏控制
    一大波静态方法
    有时候
    简单的dialog菜单
    mongodb学习(三)——函数使用的小技巧
  • 原文地址:https://www.cnblogs.com/dalianpai/p/11938807.html
Copyright © 2020-2023  润新知