使用Helm在Kubernetes集群中运行Nexus [英] Run nexus in kubernetes cluster using helm

查看:885
本文介绍了使用Helm在Kubernetes集群中运行Nexus的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个用于联系的头盔图表: https://github.com. com/helm/charts/tree/master/stable/sonatype-nexus

There is a helm chart for nexus: https://github.com/helm/charts/tree/master/stable/sonatype-nexus

我像使用头盔一样安装它:

I installed it like using helm:

helm install stable/sonatype-nexus --name=nexus

但是由于代理关系不起作用. nexus-proxy容器有日志:

But it didn't work because of nexus-proxy. There is logs for nexus-proxy container:

[vert.x-eventloop-thread-0] [io.vertx.ext.web.impl.RoutingContextImplBase]中的意外异常 路线

[vert.x-eventloop-thread-0] [io.vertx.ext.web.impl.RoutingContextImplBase] Unexpected exception in route

因此,我开始使用google并发现了该帖子: https://github.com/travelaudience/nexus-proxy/issues/4

So, i started to google and found that post: https://github.com/travelaudience/nexus-proxy/issues/4

除此以外,我们没有其他答案:

There we no answer except this:

我遇到了此错误.使用imageTag = 2.2.0解决了以下问题 我.

I encountered this error. Using imageTag=2.2.0 fixed the problem for me.

所以我删除了nexus版本并按如下方式安装了该图表:

So i deleted nexus release and installed that chart like so:

helm install stable/sonatype-nexus --name=nexus -f nexus.yml

nexus.yml是该文件,其值替换为nexus-proxy图像标签的替换值 https://github.com/helm/charts/blob /master/stable/sonatype-nexus/values.yaml

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/时,我得到了:

Now, when i hit http://localhost:8080/ i get this:

无效的主机.要浏览Nexus,请点击此处/.使用Docker 注册表,将您的客户指向.

Invalid host. To browse Nexus, click here/. To use the Docker registry, point your client at .

Tadaaam,我做错了什么? 我尝试在Mac的kubernetes中安装此图表.我尚未在GKE上成功安装此图表

Tadaaam, what i did wrong? I try to install this chart in my kubernetes on mac. I haven't succeed in installing this chart on GKE

推荐答案

我与您遇到了相同的问题(在stable/sonatype-nexus-1.10.0中),并且我试图解决该问题.我猜你的问题是由于quay.io/travelaudience/docker-nexus-proxy这样的docker映像引起的.您可以在values.yaml中看到配置,例如

I have met the same issue with you (in stable/sonatype-nexus-1.10.0) and I have tried to solve that. I guess your problem is due to docker images like quay.io/travelaudience/docker-nexus-proxy. You can see configuration in values.yaml like

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之后,我可以从图表的节点端口配置访问nexus ui.

By default, nexusDockerHost and nexusHttpHost is left blank, so the proxy will deny your access to nexus. to allow access nexus via docker-nexus-proxy. In my case, after I have added 127.0.0.1 to nexusDockerHost/nexusHttpHost, I could access nexus ui from the chart's nodeport configuration.

这篇关于使用Helm在Kubernetes集群中运行Nexus的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆