apiVersion: apps/v1
kind: Deployment
metadata:
  name: registry
  namespace: test-registry
  labels:
    app: registry
spec:
  replicas: 1
  selector:
    matchLabels:
      app: registry
  template:
    metadata:
      labels:
        app: registry
    spec:
      volumes:
      - name: certs
        secret:
          secretName: certs
      containers:
      - name: registry
        image: docker.io/library/registry:2
        volumeMounts:
        - mountPath: /certs
          name: certs
        env:
        - name: REGISTRY_HTTP_TLS_KEY
          value: /certs/domain.key
        - name: REGISTRY_HTTP_TLS_CERTIFICATE
          value: /certs/domain.crt
