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

完美结束!


文章名称:helm3安装neuxs3
当前URL:http://lszwz.com/article/ipjcdd.html

其他资讯

售后响应及时

7×24小时客服热线

数据备份

更安全、更高效、更稳定

价格公道精准

项目经理精准报价不弄虚作假

合作无风险

重合同讲信誉,无效全额退款