Kubernetes build django + uwsgi + nginx show failed (111: Connection refused) while connecting to upstream Kubernetes build django + uwsgi + nginx show failed (111: Connection refused) while connecting to upstream kubernetes kubernetes

Kubernetes build django + uwsgi + nginx show failed (111: Connection refused) while connecting to upstream


So just a thought, maybe set your uwsgi to 0.0.0.0:8001 then on your podSpec set container port values with just 8001:

apiVersion: v1kind: Podmetadata:  name: mypod  labels:    component: webspec:  containers:     - name: django      image: myimage      ports:        - containerPort: 8001    - name: nginx      image: nginx:alpine      ....

this should make it available in localhost:8001/127.0.0.1:8001


I had a similar setup, and changing socket=server_name:8081 to socket=:8081 from uwsgi settings (uwsgi.ini) resolved my problem, see uWSGI nginx error : connect() failed (111: Connection refused) while connecting to upstream