有一个 nexus 的 Helm chart :https://github.com/helm/charts/tree/master/stable/sonatype-nexus
我像使用 helm 一样安装它:
helm install stable/sonatype-nexus --name=nexus
但由于nexus-proxy,它不起作用。有 nexus-proxy 容器的日志:
[vert.x-eventloop-thread-0] [io.vertx.ext.web.impl.RoutingContextImplBase] Unexpected exception in route
所以,我开始谷歌搜索并找到了那个帖子:
https://github.com/travelaudience/nexus-proxy/issues/4
除了这个,我们没有答案:
I encountered this error. Using imageTag=2.2.0 fixed the problem for me.
所以我删除了 nexus 版本并像这样安装了该图表:
helm install stable/sonatype-nexus --name=nexus -f nexus.yml
nexus.yml is this file with replaced value of nexus-proxy image tag https://github.com/helm/charts/blob/master/stable/sonatype-nexus/values.yaml
现在,当我点击 http://localhost:8080/我明白了:
Invalid host. To browse Nexus, click here/. To use the Docker registry, point your client at .
Tadaaam,我做错了什么?
我尝试在我的 mac 上的 kubernetes 中安装这个图表。我没有成功在 GKE 上安装这个图表
最佳答案
我遇到了同样的问题(在 stable/sonatype-nexus-1.10.0 中),我试图解决这个问题。我猜你的问题是由于像 quay.io/travelaudience/docker-nexus-proxy 这样的 docker 图像。您可以在 values.yaml 中看到配置,例如
nexusProxy:
imageName: quay.io/travelaudience/docker-nexus-proxy
imageTag: 2.3.0
imagePullPolicy: IfNotPresent
port: 8080
env:
nexusDockerHost: 127.0.0.1
nexusHttpHost: 127.0.0.1
enforceHttps: false
cloudIamAuthEnabled: false
默认情况下,nexusDockerHost 和 nexusHttpHost 为空,因此代理将拒绝您访问 nexus。允许通过 docker-nexus-proxy 访问 nexus。就我而言,在将 127.0.0.1 添加到 nexusDockerHost/nexusHttpHost 后,我可以从图表的 nodeport 配置访问 nexus ui。
关于nexus - 使用 helm 在 kubernetes 集群中运行 nexus,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52274286/