helm3安装neuxs3

网友投稿 271 2022-10-30

helm3安装neuxs3

总目录索引:Helm 从入门到放弃系列

1、环境介绍

2、安装nexus

helm search repo nexushelm  pull  stable/sonatype-nexustar  xvf  sonatype-nexus-1.21.2.tgzhelm  install  nexus  ./sonatype-nexus

kubectl  get  pod

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/nexus

mkdir  -p  /helm/nexus   #在worker节点创建相应的目录 kubecel  apply  -f pv.yaml

查看pod状态

kubectl get pod

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]

kubectl edit deploy nexus-sonatype-nexus

修改nexus-proxy为nexus

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

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

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

kubectl get deploy nexus-sonatype-nexus -oyaml

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

chmod 777 /helm/nexus/kubectl delete pod nexus-sonatype-nexus-64c75f5786-gtvlg   #删掉原来的pod

完美起来了。

kubectl get svc

然后会发现端口不通

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

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

所以又要修改service文件

kubectl edit svc nexus-sonatype-nexus

再访问即可进入

用户名是admin,密码是admin123

完美结束!

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:试验站远程监控系统网络接口的设计
下一篇:Java如何实现通过键盘输入一个数组
相关文章

 发表评论

暂时没有评论,来抢沙发吧~