nexus - 使用 helm 在 kubernetes 集群中运行 nexus

标签 nexus kubernetes-helm google-kubernetes-engine

有一个 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/

相关文章:

docker - Kubernetes和Helm的配置管理

kubernetes - helm 获取子图服务名称

kubernetes - 云函数-连接Kubernetes容器

Kubernetes pod 没有分布在不同的节点上

docker - 在 dev、qa、uat 和生产中推广 docker 镜像的最佳实践

maven - OSSRH 版本未复制到 Maven Central

java - 尝试设置 Maven Nexus 服务器但收到 "Could not resolve dependencies"

web-applications - 如何在tomcat中部署nexus opensource webapp?

kubernetes - 如何在 GKE 上使用 Helm 重用动态配置的 PersistentVolume?

google-kubernetes-engine - kubectl 无法连接 GKE,失败并返回 x509 : certificate signed by unknown authority