title: why my app is not loading in browser in GKE
body: <p>I have my deployment script running with no errors.
  I have the service running with no errors.
  But when I load the external IP in the browser, it loads forever with the message:
  <a href="https://i.stack.imgur.com/usGdf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/usGdf.png" alt="enter image description here" /></a>
  Here is my docker file:</p>
  <pre><code># pull official base image
  FROM python:3.8
  
  
  EXPOSE 8080
  
  # Install GDAL dependencies
  #RUN apt-get update &amp;&amp; apt-get install --yes libgdal-dev
  #apt-get install binutils libproj-dev gdal-bin
  RUN apt-get update &amp;&amp; apt-get install  --reinstall -y \
    binutils \
    libproj-dev \
    libmemcached11 \
    libmemcachedutil2 \
    libmemcached-dev \
    libz-dev 
  
  # Copy the application's requirements.txt and run pip to install all
  # dependencies into the virtualenv.
  ADD requirements.txt /app/requirements.txt
  RUN pip install -r /app/requirements.txt
  # Add the application source code.
  ADD . .
  
  CMD exec gunicorn --bind :8080 --workers 1 --threads 8 main:app --timeout 0 --preload
  </code></pre>
  <p>Here is my deployment script:</p>
  <pre><code># [START kubernetes_deployment]
  apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: web
    labels:
      app: web
  spec:
    replicas: 3
    selector:
      matchLabels:
        app: web
    template:
      metadata:
        labels:
          app: web
      spec:
        containers:
        - name: web-app
          # Replace  with your project ID or use `make template`
          image: gcr.io/app-kor/app-kubernetes:v0.0.1
          # This setting makes nodes pull the docker image every time before
          # starting the pod. This is useful when debugging, but should be turned
          # off in production.
          #imagePullPolicy: Always
          env:
              - name: DB_HOST
                valueFrom:
                  secretKeyRef:
                    key: DB_HOST
                    name: env
              - name: DB_NAME
                valueFrom:
                  secretKeyRef:
                    key: DB_NAME
                    name: env
              - name: DB_PASSWORD
                valueFrom:
                  secretKeyRef:
                    key: DB_PASSWORD
                    name: env
              - name: DB_PORT
                valueFrom:
                  secretKeyRef:
                    key: DB_PORT
                    name: env
              - name: DB_USER
                valueFrom:
                  secretKeyRef:
                    key: DB_USER
                    name: env
              - name: DEBUG
                valueFrom:
                  secretKeyRef:
                    key: DEBUG
                    name: env
              - name: GOOGLE_APPLICATION_CREDENTIALS
                valueFrom:
                  secretKeyRef:
                    key: GOOGLE_APPLICATION_CREDENTIALS
                    name: env
              - name: INSTANCE_CONNECTION_NAME
                valueFrom:
                  secretKeyRef:
                    key: INSTANCE_CONNECTION_NAME
                    name: env
              - name: POSTGRES_DB
                valueFrom:
                  secretKeyRef:
                    key: POSTGRES_DB
                    name: env
              - name: POSTGRES_PASSWORD
                valueFrom:
                  secretKeyRef:
                    key: POSTGRES_PASSWORD
                    name: env
              - name: POSTGRES_USER
                valueFrom:
                  secretKeyRef:
                    key: POSTGRES_USER
                    name: env
              - name: SECRET_KEY
                valueFrom:
                  secretKeyRef:
                    key: SECRET_KEY
                    name: env
              - name: SENDGRID_API_KEY
                valueFrom:
                  secretKeyRef:
                    key: SENDGRID_API_KEY
                    name: env
              - name: STATIC_URL
                valueFrom:
                  secretKeyRef:
                    key: STATIC_URL
                    name: env
          ports:
          - containerPort: 8080
        # [START proxy_container]
        - image: gcr.io/cloudsql-docker/gce-proxy:1.16
          name: cloudsql-proxy
          command: [&quot;/cloud_sql_proxy&quot;, &quot;--dir=/cloudsql&quot;,
                    &quot;-instances=app:asia-northeast2:app-db=tcp:5432&quot;,
                    &quot;-credential_file=/secrets/cloudsql/credentials.json&quot;]
          volumeMounts:
            - name: cloudsql-oauth-credentials
              mountPath: /secrets/cloudsql
              readOnly: true
            - name: ssl-certs
              mountPath: /etc/ssl/certs
            - name: cloudsql
              mountPath: /cloudsql
        # [END proxy_container] 
        # [START volumes]
        volumes:
          - name: cloudsql-oauth-credentials
            secret:
              secretName: cloudsql-oauth-credentials
          - name: ssl-certs
            hostPath:
              path: /etc/ssl/certs
          - name: cloudsql
            emptyDir: {}
        # [END volumes]        
  # [END kubernetes_deployment]
  </code></pre>
  <p>Here is my deployment service:</p>
  <pre><code>apiVersion: v1
  kind: Service
  metadata:
    name: web
    labels:
      app: web
  spec:
    type: LoadBalancer
    ports:
    - port: 80
      targetPort: 8080
    selector:
      app: web
  # [END service]
  </code></pre>
  <p>When I check the logs for of the pods, I get this:
  <a href="https://i.stack.imgur.com/AHPsz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AHPsz.png" alt="enter image description here" /></a>
  Help: What is it then that am missing in this setup?
  Logs:
  <a href="https://i.stack.imgur.com/AblLX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AblLX.png" alt="enter image description here" /></a></p>