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

完美结束!

相关内容

热门资讯

特朗普下令不打了,美国的“余粮... 可以说戛然而止,快得让很多人都无法适应。前两周,每一天美国都要打击伊朗一通。就在7月24日白宫会议前...
穆杰塔巴最新表态:支持黎真主党 △伊朗最高领袖穆杰塔巴·哈梅内伊(资料图)当地时间7月26日晚,伊朗最高领袖穆杰塔巴·哈梅内伊对黎巴...
美军瘫痪一艘驶向伊朗的油轮,特... 美国总统特朗普虽下令暂停打击伊朗,但美军仍在执行对霍尔木兹海峡的封锁任务。针对美军瘫痪一艘驶向伊朗油...
“小牌大耍”的底气到底是哪里来... 澎湃首席评论员 李平这两天,“艺人李权哲乘高铁占座事件”在网上引发热议,该艺人参加的活动主办方曾发布...
越南籍船舶南海遇险沉没,中方已... 据凤凰卫视报道,一艘越南船舶7月24日夜间在越南庆和以东220海里附近遇险沉没,船上共62名越南籍人...
李权哲占座、蒙面、装死:娱乐圈... 你买了一张高铁一等座的票,找到自己的位置,18A。有人坐着。你拿出手机看了眼购票记录——没错,18A...
杭州景区咖啡店闯入1条幼蛇,仅... 夏天气温高、湿度大,蛇类活动进入高峰期,千万别被“小蛇无害”的刻板印象骗了!有些幼蛇看着迷你可爱,实...
AI开源公开信签署企业增至50... IT之家 7 月 26 日消息,英伟达、微软、IBM、Meta 等 25 家美国科技企业本周(7 月...
南阳快手短视频代运营企业的服务... 在短视频平台快速发展的背景下,企业通过快手等渠道进行内容运营已成为常见的市场动作。对于希望借助短视频...
普通人该如何跟上科技发展的步伐 这个被称作科技的词汇, 听起来既有宏大之感, 又颇为遥远, 好似仅仅归属于在实验室里专心致志钻研的科...