diff --git a/nas/ingress.yaml b/nas/ingress.yaml new file mode 100644 index 0000000..5fe5476 --- /dev/null +++ b/nas/ingress.yaml @@ -0,0 +1,44 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: nas-ingress + annotations: + # nginx.ingress.kubernetes.io/rewrite-target: / + cert-manager.io/cluster-issuer: prod-cluster-issuer + # nginx.ingress.kubernetes.io/ssl-passthrough: "false" + # nginx.ingress.kubernetes.io/enable-cors: "true" + # type of authentication + # nginx.ingress.kubernetes.io/auth-type: basic + # name of the secret that contains the user/password definitions + # nginx.ingress.kubernetes.io/auth-secret: longhorn-basic-auth + # message to display with an appropriate context why the authentication is required + # nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required ' + + # nginx.ingress.kubernetes.io/cors-allow-origin: "http://localhost:3000/" + # nginx.ingress.kubernetes.io/cors-allow-methods: "PUT, GET, POST, OPTIONS, DELETE" + # If you encounter a redirect loop or are getting a 307 response code + # then you need to force the nginx ingress to connect to the backend using HTTPS. + # + nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" + # namespace: ente-photos +spec: + ingressClassName: nginx + rules: + - host: nas.hensen.io + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: nas-external + port: + number: 5001 + + # TLS configuration for HTTPS + tls: + # TLS secretName used on ClusterIssuer + - secretName: letsencrypt-prod + hosts: + - nas.hensen.io + diff --git a/nas/service.yaml b/nas/service.yaml new file mode 100644 index 0000000..428f742 --- /dev/null +++ b/nas/service.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Service +metadata: + name: nas-external +spec: + type: ExternalName + externalName: 192.168.1.99 + ports: + - port: 5001 + protocol: TCP \ No newline at end of file