Kubernetes集群实践(06)使用Nexus3部署私有仓库
2021-04-08 23:26
标签:har 映射 个人 gem containe 安装文档 pull tcp 方便 nexus3-deployment.yaml 说明: Kubernetes集群实践(06)使用Nexus3部署私有仓库 标签:har 映射 个人 gem containe 安装文档 pull tcp 方便 原文地址:https://blog.51cto.com/huanghai/2476865
官方网站上已经有详细的安装文档,本人在此将自己的安装配置做了下笔记记录。
编写部署文件(含服务暴露)
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: nexus
spec:
selector:
matchLabels:
app: nexus
template:
metadata:
labels:
app: nexus
spec:
containers:
- name: nexus
image: sonatype/nexus3:3.21.1
imagePullPolicy: IfNotPresent
ports:
- name: web # web ui for management
containerPort: 8081 # port of web management
hostPort: 8081 # use hostport directly for access
protocol: TCP
- name: docker-office # the name of internal docker registry
containerPort: 8082 # port of docker registry
hostPort: 8082 # use hostport directly for access
resources:
requests:
cpu: 4000m # default reqirement
volumeMounts:
- name: nexus-data
mountPath: /nexus-data
volumes:
- name: nexus-data
hostPath:
path: /home/nexus-data # use local path for selected host
nodeSelector:
"kubernetes.io/hostname": nf5270m4-repo
tolerations:
- key: "node-role.kubernetes.io/node"
operator: "Exists"
effect: "PreferNoSchedule"
---
apiVersion: v1
kind: Service
metadata:
name: nexus
spec:
selector:
app: nexus
ports:
- name: webadmin
port: 8081
targetPort: 8081
- name: nexus3docker
port: 8082
targetPort: 8082
文章标题:Kubernetes集群实践(06)使用Nexus3部署私有仓库
文章链接:http://soscw.com/index.php/essay/73078.html