late-printer-99022
01/11/2020, 7:33 PM'type: 'LoadBalancer'
I got the url using ELB automatically. those urls are very long url. I want to connect using Route53.
so, I want to have this kind of urls. https://api.mydomain.com/service1 , https://api.mydomain.com/service2 ,
after looking some example, I changed type. it is now type: NodePort
. I may need to create k8s.networking.v1beta1.Ingress
and use aws-alb-ingress-controller
and route traffic. I tried and didn't worked because example was not having Route53 specific code. I don't know if it do automatically internally.
all micro-services are working fine. deployed successfully. only the routing part is now remaining. So, please help me.
1. All services need NodePort
or LoadBalancer
2. What is good url scheme ? https://api_service1.mydomain.com or https://api.mydomain.com/service1 ?
Kindly help and suggest.
+ Also, people suggest me to add API Gateway. where API Gateway comes into this picture?swift-painter-31084
01/11/2020, 9:32 PMtype: LoadBalancer
and a route53 record for the ALB to api.yourdomain.com (probably using their Alias functionality instead of specifying the load balancer as a CNAME)
API gateway can stand in front of your stack, or replace ALB if you're only running Lambdas or ECS, but likely isn't needed for EKS.
I don't think that ALB supports routing to different subdomains, but I could be incorrect.late-printer-99022
01/11/2020, 9:51 PMNodePort
?
How to do this in pulumi ? Any example ??swift-painter-31084
01/11/2020, 9:59 PMlate-printer-99022
01/11/2020, 10:16 PM2020-01-11T22:19:24.564521145Z E0111 22:19:24.564316 1 :0] kubebuilder/controller "msg"="Reconciler error" "error"="failed to build LoadBalancer configuration due to retrieval of subnets failed to resolve 2 qualified subnets. Subnets must contain the <http://kubernetes.io/cluster/|kubernetes.io/cluster/>\u003ccluster name\u003e tag with a value of shared or owned and the <http://kubernetes.io/role/elb|kubernetes.io/role/elb> tag signifying it should be used for ALBs Additionally, there must be at least 2 subnets with unique availability zones as required by ALBs. Either tag subnets to meet this requirement or use the subnets annotation on the ingress resource to explicitly call out what subnets to use for ALB creation. The subnets that did resolve were []" "controller"="alb-ingress-controller" "request"={"Namespace":"syngenta-platform","Name":"syngenta-platform-router"}
swift-painter-31084
01/11/2020, 10:30 PMlate-printer-99022
01/11/2020, 10:37 PMflat-insurance-25294
01/12/2020, 12:11 AMswift-painter-31084
01/12/2020, 12:19 AMflat-insurance-25294
01/12/2020, 12:19 AMswift-painter-31084
01/12/2020, 12:25 AMflat-insurance-25294
01/12/2020, 12:26 AMswift-painter-31084
01/12/2020, 12:34 AMconst myRecord = new aws.route53.Record("myRecord", {...}, { dependsOn: [myALB] });
flat-insurance-25294
01/12/2020, 12:35 AMswift-painter-31084
01/12/2020, 12:58 AMlate-printer-99022
01/12/2020, 3:39 AME0111 22:57:45.744049 1 :0] kubebuilder/controller "msg"="Reconciler error" "error"="failed to build LoadBalancer configuration due to unable to fetch subnets due to FilterLimitExceeded: The maximum length for a filter value is 255 characters\n\tstatus code: 400, request id: 003754e4-6d2d-4912-9f73-2322f58e2d6f" "controller"="alb-ingress-controller" "request"={"Namespace":"syngenta-platform","Name":"syngenta-platform-router"}
flat-insurance-25294
01/12/2020, 3:40 AMlate-printer-99022
01/12/2020, 3:40 AMflat-insurance-25294
01/12/2020, 3:41 AM'<http://alb.ingress.kubernetes.io/subnets|alb.ingress.kubernetes.io/subnets>': vpc.publicSubnetIds.join(',')
What type is vpc.publicSubnets, is it a promise?late-printer-99022
01/12/2020, 3:42 AMNAMESPACE NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES LABELS
agromaster agromaster-plot-5b554dc976-g2rmk 1/1 Running 0 30h 10.0.188.247 ip-10-0-225-65.ec2.internal <none> <none> name=agromaster-plot,pod-template-hash=5b554dc976
default alb-aws-alb-ingress-controller-6dfc9fbf5d-c5twl 1/1 Running 0 5h23m 10.0.238.247 ip-10-0-225-65.ec2.internal <none> <none> <http://app.kubernetes.io/instance=alb,app.kubernetes.io/name=aws-alb-ingress-controller,pod|app.kubernetes.io/instance=alb,app.kubernetes.io/name=aws-alb-ingress-controller,pod>
-template-hash=6dfc9fbf5d
kube-system aws-node-4z6mm 1/1 Running 0 11d 10.0.225.65 ip-10-0-225-65.ec2.internal <none> <none> controller-revision-hash=7bc84ccfc6,k8s-app=aws-node,pod-template-generation=2
kube-system aws-node-ptgdv 1/1 Running 0 11d 10.0.104.149 ip-10-0-104-149.ec2.internal <none> <none> controller-revision-hash=7bc84ccfc6,k8s-app=aws-node,pod-template-generation=2
kube-system coredns-56678dcf76-cz275 1/1 Running 0 11d 10.0.221.141 ip-10-0-225-65.ec2.internal <none> <none> <http://eks.amazonaws.com/component=coredns,k8s-app=kube-dns,pod-template-hash=56678dcf76|eks.amazonaws.com/component=coredns,k8s-app=kube-dns,pod-template-hash=56678dcf76>
kube-system coredns-56678dcf76-kw9dv 1/1 Running 0 11d 10.0.205.16 ip-10-0-225-65.ec2.internal <none> <none> <http://eks.amazonaws.com/component=coredns,k8s-app=kube-dns,pod-template-hash=56678dcf76|eks.amazonaws.com/component=coredns,k8s-app=kube-dns,pod-template-hash=56678dcf76>
kube-system kube-proxy-q7q6b 1/1 Running 0 11d 10.0.104.149 ip-10-0-104-149.ec2.internal <none> <none> controller-revision-hash=7f48466c4d,k8s-app=kube-proxy,pod-template-generation=1
kube-system kube-proxy-xknvz 1/1 Running 0 11d 10.0.225.65 ip-10-0-225-65.ec2.internal <none> <none> controller-revision-hash=7f48466c4d,k8s-app=kube-proxy,pod-template-generation=1
syngenta-platform syngenta-platform-ndvi-6bf4f647c4-xn8z5 1/1 Running 0 30h 10.0.203.178 ip-10-0-225-65.ec2.internal <none> <none> name=syngenta-platform-ndvi,pod-template-hash=6bf4f647c4
syngenta-platform syngenta-platform-nginx-5f7647f8dd-jrlnj 1/1 Running 0 30h 10.0.125.119 ip-10-0-104-149.ec2.internal <none> <none> name=syngenta-platform-nginx,pod-template-hash=5f7647f8dd
right now, it alb-ingress
is in default namespace. can it be a problem?flat-insurance-25294
01/12/2020, 3:43 AMlate-printer-99022
01/12/2020, 3:44 AMflat-insurance-25294
01/12/2020, 3:44 AMlate-printer-99022
01/12/2020, 3:45 AM