您好,我使用 nginx ingress在http://harbor.domain下完美运行了Harbor,我使用 Harbor-helm 图表安装。
在终端上,我可以将 helmcharts 推送到http://harbor.domain/chartrepo/,
我可以登录
docker login harbor.domain:80
并推送到注册表。
我的挑战是我想通过 apache 代理访问港口,例如
- https://example.com/v2用于注册表
- https://example.com/chartrepo用于chartrepo
- https://example.com/harbor访问harbor ui
我通过更改使用harbor-helm图表重新安装values.yaml
externalURL: https://example.com
所以我/etc/apache2/sites-available/example-le-ssl.conf
已经添加了以下内容
# helmcharts
<Location "/chartrepo/">
ProxyPass "http://harbor.domain/chartrepo/"
ProxyPassReverse "http://harbor.domain/chartrepo/"
</Location>
# harbor
<Location "/harbor">
ProxyPass "http://harbor.domain/harbor"
ProxyPassReverse "http://harbor.domain/harbor"
</Location>
# registry
<Location "/v2">
ProxyPass "http://harbor.domain/v2"
ProxyPassReverse "http://harbor.domain/v2"
</Location>
不幸的是,如果我做docker login example.com
docker login 返回
Error response from daemon: login attempt to https://example.com/v2/ failed with status: 503 Service Unavailable
我在注册表日志中收到以下错误
error authorizing context: authorization token required
关于我缺少什么的任何想法?
尝试推送图表也失败了。
helm push --username='username' --password='password' demo-chart.tgz https://example.com/chartrepo/
错误是
Error: 404: could not properly parse response JSON: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache/2.4.41 (Ubuntu) Server at example.com Port 443</address>
</body></html>