You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.0 KiB
43 lines
1.0 KiB
2 years ago
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: private-repository-k8s
|
||
|
labels:
|
||
|
app: private-repository-k8s
|
||
|
spec:
|
||
|
replicas: 1
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: private-repository-k8s
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: private-repository-k8s
|
||
|
spec:
|
||
|
volumes:
|
||
|
- name: certs-vol
|
||
|
hostPath:
|
||
|
path: /var/host/certs
|
||
|
type: Directory
|
||
|
- name: registry-vol
|
||
|
hostPath:
|
||
|
path: /var/host/lib/registry
|
||
|
type: Directory
|
||
|
|
||
|
containers:
|
||
|
- image: registry:2
|
||
|
name: private-repository-k8s
|
||
|
imagePullPolicy: IfNotPresent
|
||
|
env:
|
||
|
- name: REGISTRY_HTTP_TLS_CERTIFICATE
|
||
|
value: "/certs/registry.crt"
|
||
|
- name: REGISTRY_HTTP_TLS_KEY
|
||
|
value: "/certs/registry.key"
|
||
|
ports:
|
||
|
- containerPort: 5000
|
||
|
volumeMounts:
|
||
|
- name: certs-vol
|
||
|
mountPath: /certs
|
||
|
- name: registry-vol
|
||
|
mountPath: /var/lib/registry
|