apiVersion: v1
kind: Service
metadata:
  name: docker-registry
spec:
  ports:
    - port: 5000
      targetPort: 5000
  selector:
    app: registry
---
apiVersion: v1
kind: Pod
metadata:
  name: docker-registry-pod
  labels:
    app: registry
spec:
  containers:
  - name: registry
    image: registry:2
    volumeMounts:
    - name: repo-vol
      mountPath: "/var/lib/registry"
    ports:
    - containerPort: 5000
      name: registryport
  volumes:
  - name: repo-vol
    persistentVolumeClaim:
      claimName: docker-repo-pvc
  - name: certs-vol
    secret:
      secretName: certs-secret
  - name: auth-vol
    secret:
      secretName: auth-secret
