git diff
--- a/values.yaml
+++ b/values.yaml
@@ -25,8 +25,8 @@ expose:
commonName: ""
ingress:
hosts:
- core: core.harbor.domain
- notary: notary.harbor.domain
+ core: core.harbor.chenshaowen.com
+ notary: notary.harbor.chenshaowen.com
# set to the type of ingress controller if it has specific requirements.
# leave as `default` for most ingress controllers.
# set to `gce` if using the GCE ingress controller
@@ -95,7 +95,7 @@ expose:
# the IP address of k8s node
#
# If Harbor is deployed behind the proxy, set it as the URL of proxy
-externalURL: https://core.harbor.domain
+externalURL: https://core.harbor.chenshaowen.com
docker login core.harbor.chenshaowen.com
Username: admin
Password:
Error response from daemon: Get https://core.harbor.chenshaowen.com/v2/: x509: certificate signed by unknown authority
提示证书问题,有两种解决办法:
在 Docker 中添加受信任的证书
执行命令,获取证书,并将证书内容拷贝到配置目录:
1
kubectl get secrets/harbor-harbor-ingress -n harbor -o jsonpath="{.data.ca\.crt}"| base64 --decode
添加 –insecure-registry 仓库地址
以 OS X 为例,在 [Preferences] - [Daemon] 中添加不安全的仓库 core.harbor.chenshaowen.com 即可。
打标签,推送镜像
1
2
3
4
5
6
docker tag sonarqube:7.1 core.harbor.chenshaowen.com/library/snoarque:7.1
docker push core.harbor.chenshaowen.com/library/snoarque:7.1
The push refers to repository [core.harbor.chenshaowen.com/library/snoarque]195b3d541b37: Pushed
8fb1d730c37c: Pushing [=============> ] 48.57MB/177.1MB
1e09c232b1a9: Pushed