I have a Selenium Grid on EKS to run E2E tests.
We are trying to access the console using ALB-Ingress-Controller and DNS is created normally, but we are unable to access the console.
Is there a problem with this?
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: selenium-ingress
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/certificate-arn: acm-arn
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80},{"HTTPS": 443}]'
alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_301"}}'
spec:
rules:
- host: <my-domain>
http:
paths:
- path: /*
backend:
serviceName: ssl-redirect
servicePort: use-annotation
- path: /
backend:
serviceName: selenium-hub
servicePort: 80
---
apiVersion: v1
kind: Service
metadata:
name: selenium-hub
labels:
app: selenium-hub
spec:
ports:
- port: 80
targetPort: 4444
name: http
selector:
app: selenium-hub
type: NodePort
sessionAffinity: None
When you access the domain, this page will open
Thanks.
Adding *
to the Ingress path solved the problem
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: selenium-ingress
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/certificate-arn: acm-arn
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80},{"HTTPS": 443}]'
alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_301"}}'
spec:
rules:
- host: <my-domain>
http:
paths:
- path: /*
backend:
serviceName: ssl-redirect
servicePort: use-annotation
- path: /*
backend:
serviceName: selenium-hub
servicePort: 80