Deploying Logiq EKS with AWS ALB
Application Load Balancer inspects packets and creates access points to HTTP and HTTPS headers. It identifies the type of load and spreads it out to the target with higher efficiency based on application traffic flowing in HTTP messages. Application Load Balancer also conducts health checks on connected services on a per-port basis to evaluate a range of possible code and HTTP errors. A developer receives detailed metrics following the checks.
Prerequisites:
  • Verify that coffee running as a NodePort service.
1
k get svc -n test coffee
2
3
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
4
coffee NodePort 10.100.11.193 <none> 80:32165/TCP 40h
Copied!
  • Download the below code into a file and create a flash-ml nodeport service as shown below by applying the file using kubectl.
1
kubectl apply -f flash-ml-nodeport.yaml
Copied!
1
apiVersion: v1
2
kind: Service
3
metadata:
4
annotations:
5
meta.helm.sh/release-name: <release-name>
6
meta.helm.sh/release-namespace: <namespace-name>
7
labels:
8
app: logiq-flash-ml
9
app.kubernetes.io/managed-by: Helm
10
chart: logiq-flash-1.0.0
11
heritage: Helm
12
promMonitor: logiq-flash
13
release: test
14
name: logiq-flash-ml-np
15
namespace: test
16
spec:
17
ports:
18
- name: grpc
19
port: 8081
20
protocol: TCP
21
targetPort: 50054
22
- name: webcli
23
port: 9998
24
protocol: TCP
25
targetPort: 9998
26
- name: api
27
port: 9999
28
protocol: TCP
29
targetPort: 9999
30
- name: liveness-port
31
port: 8080
32
protocol: TCP
33
targetPort: 8080
34
selector:
35
app: logiq-flash-ml
36
release: test
37
sessionAffinity: None
38
type: NodePort
Copied!

ALB integration:

Create 3 Target groups.
  • Target group coffee
  • Create 2nd target group for Flash
Create target group for flash-ml, pick the nodeports from flash-ml-np service
1
kubectl get svc -n test|grep flash-ml
2
logiq-flash-ml-np NodePort 10.100.123.89 8081:32232/TCP,9998:31194/TCP,9999:31126/TCP,8080:31001/TCP
Copied!
Replace port with nodeport mapped to 9999 and health port (additional settings) mapped to 8080 as shown below.
Logiq would have created auto scaling group for common and Ingest nodes. Associate the Ingest ASG with flash target group.
Associate the common ASG with 2 groups created
Create Application load balancer and in the listener section
We need to route the traffic as per the below below ingress rules along with the service.
1
rules:
2
- http:
3
paths:
4
- backend:
5
service:
6
name: coffee
7
port:
8
number: 80
9
path: /*
10
pathType: ImplementationSpecific
11
- backend:
12
service:
13
name: logiq-flash
14
port:
15
number: 9999
16
path: /v1/json_batch
17
pathType: ImplementationSpecific
18
- backend:
19
service:
20
name: logiq-flash
21
port:
22
number: 9999
23
path: /v1/json
24
pathType: ImplementationSpecific
25
- backend:
26
service:
27
name: logiq-flash-ml-np
28
port:
29
number: 9999
30
path: /v1/*
31
pathType: ImplementationSpecific
32
- backend:
33
service:
34
name: logiq-flash-ml-np
35
port:
36
number: 9999
37
path: /v2/*
38
pathType: ImplementationSpecific
39
- backend:
40
service:
41
name: coffee
42
port:
43
number: 80
44
path: /*
45
pathType: ImplementationSpecific
46
Copied!
Click on manual View/edit Add edit rules, click on + section and configure the rules as shown below to the various target groups.
Note: The rules should be in the same order as shown below
If you have deployed the Logiq on private subnet, you may need to map global accelerator (under Integrated services) to access the public endpoints and DNS on top of it.
If you want to route traffic on http(port:80), ensure your listener rules are configured on port 80
If you want to route traffic on https(port:443), ensure your listener rules are configured on port 443. As a prerequisite, your global accelerator should have all the certificates configured for this to work.
Export as PDF
Copy link