# https://kubernetes.io/docs/concepts/services-networking/ingress/
apiVersion: networking.k8s.io/v1 # k8s 1.19+
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/proxy-body-size: "0"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
    kubernetes.io/tls-acme: 'true'
    # kubernetes.io/ingress.class: "nginx" # 已废弃 请使用 spec.ingressClassName k8s v1.18+
    # nginx.ingress.kubernetes.io/secure-backends: "true" # 已废弃 请看下一个条目
    nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
  name: docker-registry
  namespace: docker-registry
spec:
  ingressClassName: nginx
  tls:
  - hosts:
    - registry.<your domain>
    secretName: registry-tls
  rules:
  - host: registry.<your domain>
    http:
      paths:
      - backend:
          # serviceName: docker-registry
          # servicePort: 5000
          service:
            name: docker-registry
            port:
              # name:
              number: 5000
        path: /
        # https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types
        pathType: Prefix # Exact | Prefix | ImplementationSpecific
