Spent a long time debugging the Issue
I am trying to deploy a Ghost Docker Instance, backed by a MySQL db on GKE platform. Here is the deployment and service kube files for both. One by one I kubectl apply -f <config.yml> for each yml file in the following order:
ssd-storageclass.yml- create an ssd storage class.pvc-mysql.yml- create a PVC Claim for MySQL.pvc-ghost.yml- create a PVC Claim for ghost.deploy-mysql.yml- create a MySQL deployment.service-mysql.yml- expose MySQL instance.deploy-ghost.yml- create ghost deployment.
Once done, I expose the ghost deployment via a Load balancer on Port 80 and get an xx.xx.xx.xx IP address for LB. I am able to access ghost on the generated IP address.
This is true as long as I have env variable url in deploy-ghost.yml set as "http://www.limosyn.com".
[...]
containers:
env:
[...]
- name: database__connection__database
value: mysql
- name: url
value: "http://www.limosyn.com"
[...]
Surprisingly, when I change the protocol from http to https, i.e. https://www.limosyn.com, I am no longer able to access the deployment on the LB assigned IP. The problem goes away on changing back to http.
I have tried tens of Permutations and combinations with and without https, doing clean deployments, etc. The situation remains the same. It never works with https.
Before I had the same infra deployed via docker-compose on a single vm instance with https baseurl and that worked. I am facing this issue with Kubernetes only.
You can easily reproduce the scenario if you have a cluster lying around.
Would really appreciate a resolution