Open
Description
I'm creating this feature request to reopen the issue described here: #1223
Is your feature request related to a problem?
When you set up ALB Ingress and the service linked with this ingress is ExternalName
type, the Target Group in AWS doesn't have any targets registered and the ingress returns HTTP 503 error.
Describe the solution you'd like
Adding an ingress with an ExternalName
service type should properly route traffic to the service.
This would allow creating cross-namespace relations between Ingress and the services.
Example:
apiVersion: v1
kind: Pod
metadata:
name: nginx-pod
namespace: namespace1
labels:
app: nginx
spec:
containers:
- name: nginx-container
image: nginx:latest
ports:
- containerPort: 80
protocol: TCP
---
kind: Service
apiVersion: v1
metadata:
name: nginx-service
namespace: namespace1
spec:
selector:
app: nginx
type: ClusterIP
ports:
- port: 80
---
kind: Service
apiVersion: v1
metadata:
name: nginx-service-external
namespace: namespace2
spec:
type: ExternalName
externalName: nginx-service.namespace1.svc.cluster.local
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: test-ingress
namespace: namespace2
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/group.name: ingress
alb.ingress.kubernetes.io/certificate-arn: <placeholder>
alb.ingress.kubernetes.io/listen-ports: '[{"HTTPS":443}]'
spec:
rules:
- host: example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: nginx-service-external
port:
number: 80
Should result hosting nginx from namespace1 on ingress deployed in namespace2
Describe alternatives you've considered
- Switching to Nginx ingress controller
- Adding some nginx pod doing the proxy_pass as suggested here: Lack of ExternalName Service support #1223 (comment)