44 lines
856 B
YAML
44 lines
856 B
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: local-registry
|
|
namespace: container-registry
|
|
labels:
|
|
app: local-registry
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: local-registry
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: local-registry
|
|
spec:
|
|
containers:
|
|
- name: registry
|
|
image: registry:2
|
|
ports:
|
|
- containerPort: 5000
|
|
volumeMounts:
|
|
- name: registry-vol
|
|
mountPath: /var/lib/registry
|
|
volumes:
|
|
- name: registry-vol
|
|
persistentVolumeClaim:
|
|
claimName: registry-pvc
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: local-registry-svc
|
|
namespace: container-registry
|
|
spec:
|
|
type: NodePort
|
|
ports:
|
|
- port: 5000
|
|
targetPort: 5000
|
|
nodePort: 30500
|
|
selector:
|
|
app: local-registry
|