k8s 部署 nexus3
1. nexus3是什么?
nexus3是一个统一的仓库系统,可以作为nuget、docker、maven、npm等的仓库,可以使用一个平台管理。
2. 部署
apiVersion: v1 kind: PersistentVolume metadata: name: nexus-data spec: capacity: storage: 5Gi volumeMode: Filesystem accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: nfs nfs: path: /var/nfs/nexus-data server: 192.168.0.250 --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: nexus-data-pvc spec: accessModes: - ReadWriteOnce volumeMode: Filesystem resources: requests: storage: 5Gi storageClassName: nfs --- apiVersion: apps/v1 kind: Deployment metadata: name: nexus-deployment spec: replicas: 1 selector: matchLabels: app: nexus template: metadata: labels: app: nexus spec: containers: - name: nexus image: sonatype/nexus3 ports: - containerPort: 8081 - containerPort: 8082 - containerPort: 8083 volumeMounts: - mountPath: /nexus-data name: nexus-data volumes: - name: nexus-data persistentVolumeClaim: claimName: nexus-data-pvc --- apiVersion: v1 kind: Service metadata: name: nexus-svc spec: selector: app: nexus type: NodePort ports: - name: web protocol: TCP port: 8081 targetPort: 8081 nodePort: 30081 - name: docker protocol: TCP port: 8082 targetPort: 8082 nodePort: 30082 - name: maven protocol: TCP port: 8083 targetPort: 8083 nodePort: 30083
3.配置
- docker仓库设置 8082 的代理端口
- 配置访问权限,Security->Realms 把 Docker Bearer Token Realm 移到右边的框中保存。
相关推荐
Topbeyond 2020-08-21
随心而作 2020-06-04
VanTYS 2020-06-03
liyansring 2020-06-01
chenjia00 2020-03-07
糊一笑 2020-01-17
iamplane 2019-12-29
gongzhiyao0 2011-07-27
咏月东南 2019-11-03
啦啦啦啦啦 2017-11-10
lilygg 2017-11-09
libowenhit 2011-04-22
aobaxiaoli 2019-08-22
zousongshan 2014-05-04
wacsdn 2011-08-12
水果篮 2016-10-23
itmale 2015-07-11