Open manushi-bcsn opened 1 week ago
@manushi-bcsn Can you share your full manifest again? It looks like a formatting error. I tried creating an ingress using following manifest and it worked for me.
# Ingress
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
namespace: xxx
name: ig-xxx
annotations:
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 443}]'
alb.ingress.kubernetes.io/actions.forward-tg: |
{"type":"forward","targetGroupARN": "arn:aws:elasticloadbalancing:us-east-1:xxxxxxxxx:targetgroup/dssdde/xxxx"}
spec:
ingressClassName: alb
rules:
- host: abc.com
- http:
paths:
- path: /bmw
pathType: Prefix
backend:
service:
name: forward-tg
port:
name: use-annotation
@shraddhabang
Thanks for the quick reply. I'll try in my newly created cluster and if it's still not work then I'll let you know. I found out that something is fishy in our cluster.
I have added a below annotations in my ingress file.
K8s version: 1.29 ALB controller is installed using helm chart.
alb.ingress.kubernetes.io/actions.forward-tg: | {"type":"forward","targetGroupARN":"ARN of target group"}
Also I have used it in ingress spec. spec: rules:
But it is showing error like as below:
error: forward-tg:use-annotation (<error: endpoints "forward-tg" not found>)
Just to add ALB and my EC2 both are in same VPC and also EC2 is in public subnet. I have checked to add rule manually in ALB and it is working properly.
I don't know what's the issue with ingress that it could not find my target group ARN.
Can anyone please help me with this?