I’m trying to expose a service running in the atlantis
namespace through an ALB Ingress Controller that’s deployed in the application
namespace on AWS EKS. The ALB is being created and reconciled successfully, but the backend health checks are failing.
The NodePort services in the application namespace work fine since the Ingress is deployed there as well. However, I want to use the same Ingress to expose a service that’s running in the atlantis
namespace.
My current ingress details
--- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: ff-public namespace: application annotations: .... alb.ingress.kubernetes.io/target-type: instance .... spec: rules: .... # SOME RULES .... - host: atlantis-event.{{ $.Values.dns.domain_name }} http: paths: - path: /* pathType: ImplementationSpecific backend: service: name: atlantis # different namespace service port: number: 80
The main problem is when I try to use name: atlantis.atlantis.svc.cluster.local
instead of name: atlantis
in ingress, it throws me
Error: UPGRADE FAILED: cannot patch "ff-public" with kind Ingress: Ingress.networking.k8s.io "ff-public" is invalid: spec.rules[2].http.paths[0].backend.service.name: Invalid value: "atlantis.atlantis": a DNS-1035 label must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character (e.g. 'my-name', or 'abc-123', regex used for validation is 'a-z?') error.
I tried ExternalName, NodePort + Manual Endpoints, ClusterIP approaches, but ALB controller couldn't resolve ExternalName services properly. I can't change target-type from instance
to IP
. Is it possible to use same ALB for different namespaces' nodeport service ?