I'm using kubernet to deploy my application: Here's my service description:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: flaskgql
labels:
name: flaskgql
spec:
replicas: 1
template:
metadata:
labels:
name: flaskgql
spec:
containers:
- name: flaskgql
image: cryptodraco/flask_gql
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
volumeMounts:
- name: secrets
mountPath: /etc/secrets
readOnly: true
volumes:
- name: secrets
secret:
secretName: db-passwords
---
apiVersion: v1
kind: Service
metadata:
name: flaskgql
labels:
name: flaskgql
spec:
type: LoadBalancer
#loadBalancerIP: 35.189.238.42
ports:
- port: 80
targetPort: 8080
selector:
name: flaskgql
When I list my services, everythings is fine:
flaskgql LoadBalancer 10.59.251.206 35.189.238.42 80:30677/TCP 6m
And my docker file is as follow:
FROM gcr.io/google_appengine/python
RUN virtualenv /env
# source venv/bin/activate
ENV VIRTUAL_ENV /env
ENV PATH /env/bin:$PATH
ADD requirements.txt /app/requirements.txt
RUN pip install -r /app/requirements.txt
# no database - SQL only
#ENV NODB 1
ADD . /app
CMD gunicorn -b :$PORT wsgi:app
But when I try to access my assigned static ip, it is not working.
Note: I have already done the same thing before and it was ok. But now when I access the static ip, I get a 404error. Seems like my gunicorn server is not port forwarded to the ip. Even if from gcloud I get:
I don't know if it is because I should stick the VM instead of the instance. But all I know is that it is not working and I have no idea how to debug that. Thanks in advance