helm3安装neuxs3
admin
2023-03-27 16:01:27
0

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

完美结束!

相关内容

热门资讯

今日重磅消息“今日花牌真的有挂... 网上科普关于“今日花牌有没有挂”话题很是火热,小编也是针对今日花牌作*弊开挂的方法以及开挂对应的知识...
终于懂了“乐禧棋牌有挂吗?”(... 有 亲,根据资深记者爆料乐禧棋牌是可以开挂的,确实有挂(咨询软件无需打开...
今日重磅消息“新超凡炸/金/花... 您好:新超凡炸/金/花这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9752949】很多玩家在...
今日重大通报“点点四川长牌开挂... 您好:点点四川长牌这款游戏可以开挂,确实是有挂的,需要了解加客服微信【4282891】很多玩家在这款...
军费狂飙,日本“新军国主义”加... 12月26日,日本内阁会议批准2026财年防卫预算,总额高达9.0353万亿日元,再次刷新历史纪录。...
【第一消息】“开心泉州麻将真的... 有 亲,根据资深记者爆料开心泉州麻将是可以开挂的,确实有挂(咨询软件无需...
尹锡悦被特检组求刑十年,韩执政... 【环球时报驻韩国特约记者 刘媛 环球时报特约记者 韩雯】据韩联社26日报道,韩国负责调查紧急戒严事件...
终于了解“hhpoker可以开... 网上科普关于“hhpoker有没有挂”话题很是火热,小编也是针对hhpoker作*弊开挂的方法以及开...
玩家最新攻略“微友麻将究竟有挂... 有 亲,根据资深记者爆料微友麻将是可以开挂的,确实有挂(咨询软件无需打开...
今日重大通报“万圣节消除大作战... 家人们!今天小编来为大家解答万圣节消除大作战透视挂怎么安装这个问题咨询软件客服徽4282891的挂在...