Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run nexus in kubernetes cluster using helm

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

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] Unexpected exception in route

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

There we no answer except this:

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

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

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

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

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

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

like image 998
Alexander Kondaurov Avatar asked Sep 11 '18 10:09

Alexander Kondaurov


2 Answers

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

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.

like image 104
Hawk Ista Avatar answered Nov 03 '22 13:11

Hawk Ista


Worked for me! It created another ReplicaSet and I had to delete the original one in order to avoid a healthcheck failure in the new pod, but then it worked properly.

like image 23
Xavi Avatar answered Nov 03 '22 13:11

Xavi