<p>this might be a silly question but how can i get my <a href="https://localhost:5000" rel="nofollow noreferrer">https://localhost:5000</a> working through my flask kuberenetes app to ensure its returning back the right info? </p>

<p>This is my workflow so far: </p>

<pre><code>$ eval $(minikube docker-env)
$ docker build ...
$ kubectl apply -f deploy.yaml (contains deployment &amp; service)
$ kubectl set image...
</code></pre>

<p><code>kubectl logs...</code> returns this below: also my pods are up and running so nothing is failing </p>

<pre><code> * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: on
 * Running on https://0.0.0.0:5000/  (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 443-461-677
</code></pre>

<p>the only thing is when i go to that address in my browser it says the site can't be reached. when i <code>curl https://localhost:5000</code> or <code>curl https://0.0.0.0:5000/</code> i get a failed to connect error. i feel like my enviroment/set up is wrong somehow. any tips/suggestions? 
thank you! </p>

<p>also heres my deploy.yaml file: </p>

<pre><code>apiVersion: apps/v1beta1 
kind: Deployment
metadata:
  name: myapp
  namespace: test-space
spec:
  selector:
    matchLabels:
      app: myapp
  replicas: 3 
  template: 
    metadata:
      labels:
        app: myapp
    spec:
      containers:
      - name: myapp
        image: myapp
        imagePullPolicy: IfNotPresent
        volumeMounts:
        - name: secret-volume
          mountPath: /etc/secret-volume
        ports: 
        - containerPort: 80
        env:
        - name: "SECRET_KEY"
          value: /etc/secret-volume/secret-key
        - name: "SECRET_CRT"
          value: /etc/secret-volume/secret-crt
      volumes:
        - name: secret-volume
          secret: 
            secretName: my-secret3
---
apiVersion: v1
kind: Service
metadata:
  name: myapp
  namespace: test-space
spec:
  type: NodePort
  selector:
    app: myapp
  ports:
  - protocol: TCP
    port: 80
    targetPort: 5000
    nodePort: 30000
</code></pre>

<p><strong>Dockerfile:</strong></p>

<pre><code>FROM python:2

RUN mkdir -p /usr/src/app

WORKDIR /usr/src/app

COPY requirements.txt /usr/src/app/

RUN pip install --no-cache-dir -r requirements.txt

COPY . /usr/src/app

EXPOSE 5000

CMD ["python", "app.py"]
</code></pre>

helloworld
<p>As you have exposed <code>Port 5000</code> in the Dockerfile, you need to expose the same Port in the container in your Deployment. After that, you need to configure your Service to use this Port.</p>

<p>It should look like this:</p>

<pre><code>apiVersion: apps/v1beta1 
kind: Deployment
metadata:
  name: myapp
  namespace: test-space
spec:
  selector:
    matchLabels:
      app: myapp
  replicas: 3 
  template: 
    metadata:
      labels:
        app: myapp
    spec:
      containers:
      - name: myapp
        image: myapp
        imagePullPolicy: IfNotPresent
        volumeMounts:
        - name: secret-volume
          mountPath: /etc/secret-volume
        ports: 
        - containerPort: 5000 #&lt;&lt;&lt;PORT FIXED
        env:
        - name: "SECRET_KEY"
          value: /etc/secret-volume/secret-key
        - name: "SECRET_CRT"
          value: /etc/secret-volume/secret-crt
      volumes:
        - name: secret-volume
          secret: 
            secretName: my-secret3
---
apiVersion: v1
kind: Service
metadata:
  name: myapp
  namespace: test-space
spec:
  type: NodePort
  selector:
    app: myapp
  ports:
  - protocol: TCP
    port: 5000 #&lt;&lt;&lt;PORT FIXED
    targetPort: 5000
    nodePort: 30000
</code></pre>

<p>After that, you can reach you application on <code>&lt;any-kubernetes-node-IP&gt;:30000</code></p>
