<p>I created a flask app to run in container.</p>
<p><strong>Dockerfile</strong></p>
<pre><code>FROM python:3.7
LABEL MAINTAINER=&quot;Anirban&quot;
RUN mkdir /app
WORKDIR /app
COPY . /app/
RUN pip install -r requirements.txt
RUN python setup.py install
ENV PORT 5000
ENV SERVER_NAME &quot;0.0.0.0:5000&quot;
EXPOSE 5000
CMD [ &quot;python&quot;, &quot;userapp/app.py&quot; ]
</code></pre>
<p>My application structure</p>
<pre><code>[project] 
    |
    --userapp
    |    |
    |     --app.py
    --Dockerfile
</code></pre>
<p>Flask configuration</p>
<pre><code>def initialize_app(flask_app):
    flask_app.register_blueprint(SWAGGERUI_BLUEPRINT, url_prefix=SWAGGER_URL)
    flask_app.register_blueprint(user_endpoints.REQUEST_API)
    flask_app.config['SERVER_NAME'] = os.environ.get('SERVER_NAME', settings.FLASK_SERVER_NAME)


if __name__ == &quot;__main__&quot;:
    initialize_app(app)
    app.run(debug=os.environ.get('FLASK_DEBUG', settings.FLASK_DEBUG))
</code></pre>
<p>Deployment</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: userauthapp
  labels:
    app: userauthapp
spec:
  replicas: 1
  selector:
    matchLabels:
      app: userauthapp
  template:
    metadata:
      labels:
        app: userauthapp
    spec:
      containers:
        - name: userauthapp
          image: &lt;my image&gt;
          ports:
            - containerPort: 5000
          imagePullPolicy: Always
</code></pre>
<p>Loadbalancer</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: userauthapp-lb-svc
spec:
  selector:
    app: userauthapp
  ports:
    - protocol: &quot;TCP&quot;
      port: 8080
      targetPort: 5000
  type: LoadBalancer
</code></pre>
<p>When I deploy both of them on minikube, I can see them running as below:</p>
<pre><code>NAME                               READY   STATUS    RESTARTS   AGE
pod/userauthapp-6cc76bd66b-vst5n   1/1     Running   0          38s

NAME                         TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE
service/kubernetes           ClusterIP      10.96.0.1        &lt;none&gt;        443/TCP          267d
service/userauthapp-lb-svc   LoadBalancer   10.107.117.254   &lt;pending&gt;     8080:31145/TCP   2s
</code></pre>
<p>But I cannot access them with: curl 10.107.117.254:8080/ (which is health check api) or curl 10.107.117.254:8080/swagger. Does any one have an idea what was wrong with it?</p>

Anirban B
<p>I got the issue. As it runs on minikube, it would be minikube IP that I needed to hit. Below command gives the minikube IP:</p>
<pre><code>minikube ip
</code></pre>
<p>Below command returns IP and corresponding service port</p>
<pre><code>minikube service --url userauthapp-lb-svc
</code></pre>
