app deployed to Kubernetes but it is not accessible

4/7/2020

i'm working with aws eks (Kubernestes cluster) to deploy an application from gitlab to the an aws cluster. When i deploy the app to the cluster i see some services with command kubectl get service --all-namespaces und i get laodbalancer but i can not access to the app. The application called csa-17887811-production (see Screenshot). I think i have to add it to the Pods. when i type kubectl get pods i see only the Hello world application called "web". Could you please show me, how can i access the app from the web browser throw the Loadbalancer.

Note: when i navigate with the loadbalancer link i get this response : default backend - 404 enter image description here

-- Iliass Hilmi
amazon-web-services
continuous-integration
eks
gitlab
kubernetes

1 Answer

4/7/2020

It seems you want to expose the app via nginx ingress. For that you need to create a ClusterIP service and an ingress resource.

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: test-ingress
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - http:
      paths:
      - path: /testpath
        pathType: Prefix
        backend:
          serviceName: test
          servicePort: 80

A pictorial representation of how you can access pods using ingress and load balancer on AWS.

ingress architecture

https://aws.amazon.com/blogs/opensource/network-load-balancer-nginx-ingress-controller-eks/

-- Arghya Sadhu
Source: StackOverflow