点击项目-配置中心-密文,配置harbor地址
配置完仓库地址需要在对应的k8s master节点 worker节点,配置私有仓库地址要是不配置会报错
[root@k8smaster ~]# docker login 10.4.7.9:80/ -u admin -p Harbor12345
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: Get https://10.4.7.9:80/v2/: http: server gave HTTP response to HTTPS client
[root@k8smaster ~]# docker login 10.4.7.9:80 -u admin -p Harbor12345 --password-stdin
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
--password and --password-stdin are mutually exclusive
vi /etc/docker/daemon.json
{
"insecure-registries":["10.4.7.9:80"]
}
配置报错信息,配置完需要重启docker,或者reload
[root@k8smaster ~]# vi /etc/docker/daemon.json
[root@k8smaster ~]# systemctl reload docker
重新登录成功