helm3安装neuxs3-创新互联

1、环境介绍

为南漳等地区用户提供了全套网页设计制作服务,及南漳网站建设行业解决方案。主营业务为成都网站制作、成都网站建设、南漳网站设计,以传统方式定制建设网站,并提供域名空间备案等一条龙服务,秉承以专业、用心的态度为用户提供真诚的服务。我们深信只要达到每一位用户的要求,就会得到认可,从而选择与我们长期合作。这样,我们也可以走得更远!

helm3安装neuxs3

2、安装nexus

helm search repo nexus

helm  pull  stable/sonatype-nexus

tar  xvf  sonatype-nexus-1.21.2.tgz

helm  install  nexus  ./sonatype-nexus

helm3安装neuxs3

kubectl  get  pod

helm3安装neuxs3

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

从而得知在请求pvc,所以创建pv

vim  pv.yaml    #这里采用的hostpath apiVersion: v1 kind: PersistentVolume metadata:   name: nexus-pv spec:   capacity:     storage: 10Gi   volumeMode: Filesystem   accessModes:   -  ReadWriteOnce   persistentVolumeReclaimPolicy: Retain   hostPath:     path: /helm/nexusmkdir  -p  /helm/nexus   #在worker节点创建相应的目录 kubecel  apply  -f pv.yaml

helm3安装neuxs3

查看pod状态

kubectl get pod

helm3安装neuxs3

kubectl logs nexus-sonatype-nexus-79b5865bbc-4lb49 #会报错,是因为容器的名字重复“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]

helm3安装neuxs3

kubectl edit deploy nexus-sonatype-nexus   

修改nexus-proxy为nexus

helm3安装neuxs3

再次查看pod状态,还是有问题

helm3安装neuxs3

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 directory Warning:  Cannot open log file: /nexus-data/log/jvm.log Warning:  Forcing option -XX:LogFile=/tmp/jvm.log Unable 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

helm3安装neuxs3

从而得知是目录/nexus-data/instances没有权限

kubectl get deploy nexus-sonatype-nexus -oyaml

helm3安装neuxs3

是因为我们创建的pv没有权限,在worker节点给与刚才创建pv的目录777权限

chmod 777 /helm/nexus/

kubectl delete pod nexus-sonatype-nexus-64c75f5786-gtvlg   #删掉原来的pod

helm3安装neuxs3

完美起来了。

kubectl get svc

helm3安装neuxs3

然后会发现端口不通

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

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

helm3安装neuxs3

可以看到8080并不是nexus的真正端口,而真正的端口是

helm3安装neuxs3

所以又要修改service文件

kubectl edit svc nexus-sonatype-nexus

helm3安装neuxs3

再访问即可进入

helm3安装neuxs3

用户名是admin,密码是admin123

完美结束!

另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


文章标题:helm3安装neuxs3-创新互联
文章来源:http://scyanting.com/article/cogijs.html