enter image description hereI have a linux vm with k3s installed, and installed a Nginx-Ingress controller. I’m facing an issue while setting up the Nginx Ingress controller in my Kubernetes cluster. My goal is to setup https in the frontend, but I keep encountering a persistent 502 Bad Gateway error when accessing my application via the Ingress URL (app.192.168.[something].nip.io
).
The error logs of the Ingress-NginX shows:
connect() failed (111: Connection refused) while conencting to upstream, client: 192.168.223.229, server: app.192.168.[something].nip.io, request:
"GET / HTTP/ 2.0", upstream: "http://10.43.141.56:3000/", host: "app.192.168.[something].nip.io"
The frontend runs, the pod is up, I’m not sure where to go from here.
The Ingress resource:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress
annotations:
nginx.ingress.kubernetes.io/service-upstream: "true"
spec:
ingressClassName: nginx
tls:
- secretName: dailygrind-tls
hosts:
- app.192.168.[something].nip.io
rules:
- host: app.192.168.[something].nip.io
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: frontend
port:
number: 3000