Here is a summary of what I'm trying to do:
I can get my flask app to respond without HTTPS/SSL. But am receiving a '503 Service Unavailable' when I am trying to use SSL. My understanding is since the load balancer has the Cloudflare origin certificate installed, it will SSL terminate so the flask app does not need modifications for SSL.
Here is my Kubernetes yaml for the load balancer and flask app service:
apiVersion: v1 kind: Service metadata: name: flask-service labels: run: flask-service annotations: service.beta.kubernetes.io/do-loadbalancer-tls-ports: "443" service.beta.kubernetes.io/do-loadbalancer-certificate-id: "68e1d971-1a7c-40d2-8f33-aed797a9535d" spec: selector: app: flask ports: - name: tcp protocol: "TCP" port: 5000 targetPort: 5000 - name: https protocol: TCP port: 443 targetPort: 5000 type: LoadBalancer --- apiVersion: apps/v1 kind: Deployment metadata: name: flask spec: selector: matchLabels: app: flask replicas: 1 template: metadata: labels: app: flask spec: containers: - name: flask imagePullPolicy: Always image: gcr.io/xxxxyyyyyy/flask:staging ports: - containerPort: 5000 resources: limits: memory: 8000Mi requests: memory: 4000Mi I would appreciate any suggestions as I have been looking at this problem for the past few days with no luck.
