Reputation: 29
I have 5 microservices which I wish to allow external traffic to. These microservices will be hosted on different subdomains. I am using K8s cluster on EKS and have the cluster and other services running. There seems to be quite a lot of confusion when it comes to Ingress. I have configured the ALB ingress controller by following this tutorial on eksworkshop. This worked for me and I am able to deploy the 2048 game as the tutorial explains.
Now what I wish to develop is an Ingress resource as following:
# apiVersion: networking.k8s.io/v1beta1
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: cluster-ingress
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip
spec:
rules:
- host: app.my-domain.com
http:
paths:
- path: /*
backend:
serviceName: app-cluster-ip-service
servicePort: 3000
- host: ms1.my-domain.com
http:
paths:
- path: /*
backend:
serviceName: ms1-cluster-ip-service
servicePort: 8000
- host: ms2.my-domain.com
http:
paths:
- path: /*
backend:
serviceName: ms2-cluster-ip-service
servicePort: 2000
- host: ms3.my-domain.com
http:
paths:
- path: /*
backend:
serviceName: ms3-cluster-ip-service
servicePort: 4000
- host: website.my-domain.com
http:
paths:
- path: /*
backend:
serviceName: website-cluster-ip-service
servicePort: 3333
I use Cloudflare for DNS management if that helps.
Upvotes: 2
Views: 3052
Reputation: 8172
Upvotes: 1