Get the App
SLTechnology News&Howtos  ›  Servers  › 

Helm3 install neuxs3

Shulou Source: shulou.com Published: 2022-06-03 02:34:48 11月12日 Update

1. Environmental introduction

2. Install nexus

Helm search repo nexus

Helm pull stable/sonatype-nexus

Tar xvf sonatype-nexus-1.21.2.tgz

Helm install nexus. / sonatype-nexus

Kubectl get pod

Kubectl describe pod nexus-sonatype-nexus-79b5865bbc-4lb49

To know that a pvc is being requested, so create a pv

Vim pv.yaml # hostpathapiVersion: v1kind: PersistentVolumemetadata: name: nexus-pvspec: capacity: storage: 10Gi volumeMode: Filesystem accessModes:-ReadWriteOnce persistentVolumeReclaimPolicy: Retain hostPath: path: / helm/nexusmkdir-p / helm/nexus # create the corresponding directory kubecel apply-f pv.yaml on the worker node

View pod status

Kubectl get pod

Kubectl logs nexus-sonatype-nexus-79b5865bbc-4lb49# reports an error because the name of the container repeats "nexus nexus-proxy" Error from server (BadRequest): a container name must be specified for pod nexus-sonatype-nexus-79b5865bbc-4lb49, choose one of: [nexus nexus-proxy]

Kubectl edit deploy nexus-sonatype-nexus

Change nexus-proxy to nexus

Check the pod status again, there is still a problem

Kubectl logs nexus-sonatype-nexus-64c75f5786-gtvlg Java HotSpot (TM) 64-Bit Server VM warning: Cannot open file / nexus-data/log/jvm.log due to No such file or directoryWarning: Cannot open log file: / nexus-data/log/jvm.logWarning: Forcing option-XX:LogFile=/tmp/jvm.logUnable to update instance pid: Unable to create directory / nexus-data/instances/nexus-data/log/karaf.log (No such file or directory) Unable to update instance pid: Unable to create directory / nexus-data/instances

Thus we know that the directory / nexus-data/instances does not have permission.

Kubectl get deploy nexus-sonatype-nexus-oyaml

Because the pv we created does not have permission, give permission to the directory that just created the pv in the worker node

Chmod 777 / helm/nexus/

Kubectl delete pod nexus-sonatype-nexus-64c75f5786-gtvlg # Delete the original pod

It's perfect.

Kubectl get svc

Then you will find that the port is not working.

Telnet 192.18.10.12 30070Trying 192.18.10.12...telnet: connect to address 192.18.10.12: Connection refused

Vim / root/nexus/sonatype-nexus/values.yaml

You can see that 8080 is not the real port of nexus, but the real port is

So we have to modify the service file again.

Kubectl edit svc nexus-sonatype-nexus

Re-visit to enter

User name is admin and password is admin123

A perfect end!

Tags: Permissions directory port status node again name container password file environment user user name or question will be reported Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Shulou Information Docker Xiaomi OPPO Reno