helm3安装neuxs3

发布时间:2020-06-17 22:09:48 作者:羊皮裘老头
来源:网络 阅读:876

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

完美结束!

推荐阅读:
  1. 第二十章 九析带你轻松完爆 helm3 mysql
  2. 第十九章 九析带你轻松完爆 helm3 istio 安装

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

helm3安装nexus helm安装nexus3 eu

上一篇:工作流引擎JFlow与activiti 对比分析(一)5种基本控制流模式的对比

下一篇:ASP.NET 利用AJAX实现搜索提示(上)

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》