-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathregistry-deployment-with-credentials.yaml
60 lines (60 loc) · 1.25 KB
/
registry-deployment-with-credentials.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
run: registry
name: registry
namespace: registry
spec:
replicas: 2
selector:
matchLabels:
run: registry
template:
metadata:
labels:
run: registry
spec:
containers:
- name: registry
image: registry:2
ports:
- containerPort: 5000
env:
- name: REGISTRY_HTTP_TLS_CERTIFICATE
value: "/certs/tls.crt"
- name: REGISTRY_HTTP_TLS_KEY
value: "/certs/tls.key"
volumeMounts:
- name: registry-certs
mountPath: "/certs"
readOnly: true
- name: registry-data
mountPath: /var/lib/registry
subPath: registry
volumes:
- name: registry-certs
secret:
secretName: registry-cert
- name: registry-data
hostPath:
path: /home/msevinc/registry/data
type: DirectoryOrCreate
imagePullSecrets:
- name: registry-credential
---
apiVersion: v1
kind: Service
metadata:
name: registry-service
namespace: registry
spec:
type: ClusterIP
selector:
run: registry
ports:
- name: registry-tcp
protocol: TCP
port: 5000
targetPort: 5000
clusterIP: 10.233.55.68