第四章 部署K8s前准备工作

[root@hdss7-200 ~]# docker login -u admin harbor.od.com
Password:
Error response from daemon: login attempt to http://harbor.od.com/v2/ failed with status: 502 Bad Gateway
切换到对应目录,查看是否所有的docker容器正常运行
src]# cd /opt/harbor
harbor]# ls
common docker-compose.yml harbor.v1.8.5.tar.gz harbor.yml install.sh LICENSE prepare
如下,发现有些容器未能正常启动
harbor]# docker-compose ps
Name Command State Ports
-----------------------------------------------------------------------------------------
harbor-core /harbor/start.sh Up
harbor-db /entrypoint.sh postgres Exit 255
harbor-jobservice /harbor/start.sh Exit 255
harbor-log /bin/sh -c /usr/local/bin/ ... Up 127.0.0.1:1514->10514/tcp
harbor-portal nginx -g daemon off; Up 80/tcp
nginx nginx -g daemon off; Exit 255
redis docker-entrypoint.sh redis ... Exit 255
registry /entrypoint.sh /etc/regist ... Exit 255
registryctl /harbor/start.sh Up
此时只需要重启一下容器集群就行
harbor]# docker-compose stop
Stopping harbor-portal ... done
Stopping harbor-core ... done
Stopping registryctl ... done
Stopping harbor-log ... done
harbor]# docker-compose ps
Name Command State Ports
---------------------------------------------------------------------
harbor-core /harbor/start.sh Exit 137
harbor-db /entrypoint.sh postgres Exit 255
harbor-jobservice /harbor/start.sh Exit 255
harbor-log /bin/sh -c /usr/local/bin/ ... Exit 137
harbor-portal nginx -g daemon off; Exit 0
nginx nginx -g daemon off; Exit 255
redis docker-entrypoint.sh redis ... Exit 255
registry /entrypoint.sh /etc/regist ... Exit 255
registryctl /harbor/start.sh Exit 137
harbor]# docker-compose start
Starting log ... done
Starting registry ... done
Starting registryctl ... done
Starting postgresql ... done
Starting core ... done
Starting portal ... done
Starting redis ... done
Starting jobservice ... done
Starting proxy ... done
harbor]# docker-compose ps
Name Command State Ports
-----------------------------------------------------------------------------------------------
harbor-core /harbor/start.sh Up
harbor-db /entrypoint.sh postgres Up 5432/tcp
harbor-jobservice /harbor/start.sh Up
harbor-log /bin/sh -c /usr/local/bin/ ... Up 127.0.0.1:1514->10514/tcp
harbor-portal nginx -g daemon off; Up 80/tcp
nginx nginx -g daemon off; Up 0.0.0.0:180->80/tcp,:::180->80/tcp
redis docker-entrypoint.sh redis ... Up 6379/tcp
registry /entrypoint.sh /etc/regist ... Up 5000/tcp
registryctl /harbor/start.sh Up
尝试登录,没有问题
harbor]# docker login -u admin harbor.od.com
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
~]# docker logout

原文链接:https://blog.51cto.com/u_15127549/3349285

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享