Request routing to microservice from ALB via api-gateway registered with service registry (eureka)

deployed three micro services(api-gateway, service registry & MS1 in java spring boot ) in EKS.

Each service is running as an independent pod behind ALB(not internet facing).

Arch diagram-showing api-gateway & microservices are registered as client with service registry & flow of request from ALB to Microservice via api-gateway.

Problem statement :-request from front end to backend service(from ALB to MS1 via api gateway) is not processed further from api gateway. Apigateway is unable to identify MS1 service for rest call.

Attached application properties & configuration sample for one service

API-GATEWAY.properties

server.port=5190
spring.application.name=API-GATEWAY
#Routes configuration for testing MS1
spring.cloud.gateway.routes[0].id=MS1
spring.cloud.gateway.routes[0].uri=lb://MS1
spring.cloud.gateway.routes[0].predicates[0]=Path= /**

eureka.instance.prefer-ip-address=false
spring.cloud.gateway.discovery.locator.enabled=true
spring.main.web-application-type=reactive
spring.main.allow-bean-definition-overriding=true
spring.cloud.compatibility-verifier.enabled=false
eureka.client.register-with-eureka=true
eureka.client.fetch-registry=true
eureka.instance.hostname=service-registry.default.svc.cluster.local
eureka.client.serviceUrl.defaultZone=http://service-registry.default.svc.cluster.local/SERVICE-REGISTRY/eureka/
———————————————————————————————————————————

deployment and service .yml@apigateway

apiVersion: apps/v1
kind: Deployment
metadata:
name: apigateway-rest
spec:
replicas: 1
selector:
matchLabels:
app: apigateway-rest
template:
metadata:
labels:
app: apigateway-rest
spec:
containers:

  • env:
    envFrom:
  • configMapRef:
    name: rds-config
    image: <ECR -image url >
    name: apigateway-rest
    ports:
  • containerPort: 5190

apiVersion: v1
kind: Service
metadata:
name: apigateway-rest
spec:
ports:

  • port: 80
    protocol: TCP
    targetPort: 5190
    selector:
    app: apigateway-rest

deployment & service@serviceserviceyaml @service registry(eureka)
apiVersion: apps/v1
kind: Deployment
metadata:
name: service-registry
spec:
replicas: 1
selector:
matchLabels:
app: service-registry
template:
metadata:
labels:
app: service-registry
spec:
containers:

  • env:
    envFrom:
  • configMapRef:
    name: rds-config
    image:
    name: service-registry
    ports:
  • containerPort: 5181
    volumeMounts:
  • mountPath: /logs/
    name: app-logs
    volumes:
  • name: app-logs
    persistentVolumeClaim:
    claimName: app-logs-pvc

apiVersion: v1
kind: Service
metadata:
name: service-registry
spec:
ports:

  • port: 80
    protocol: TCP
    targetPort: 5181
    selector:
    app: service-registry