deploy Laravel in kubernetes (help)


I’m trying to deploy a laravel application in kubernetes at Google Cloud Platform.

I followed couple of tutorials and was successful trying them locally on a docker VM.

But when tried to deploy in kubernetes using an ingress to assign a domain name to the application. I keep getting the 502 bad gateway page.

I’m using a nginx ingress controller with image and my ingress is as following

apiVersion: extensions/v1beta1
kind: Ingress
  name: ingress
  annotations: "nginx"
  - hosts:
    secretName: sslcertificate
  - host:
      - backend:
          serviceName: service
          servicePort: 80
        path: /

I tried to add the dmain entry to the hosts file but with no luck !! is there a specific configurations I have to add to the configmap.yaml file for the nginx ingress controller?