apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: akb-ingress-redirect
  annotations:
    nginx.ingress.kubernetes.io/configuration-snippet: |
      rewrite ^/(.*)$ https://akingbee.com/$1 permanent;
spec:
  tls:
  - hosts:
    - "www.$(MAIN_HOSTED_ZONE)"
    secretName: akingbee-tls

  rules:
  - host: "www.$(MAIN_HOSTED_ZONE)"
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: poseidon
            port:
              number: 9000