Weird Issue while deploying Ghost container on Kubernetes

Viewed 119

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:

  1. ssd-storageclass.yml - create an ssd storage class.
  2. pvc-mysql.yml - create a PVC Claim for MySQL.
  3. pvc-ghost.yml - create a PVC Claim for ghost.
  4. deploy-mysql.yml - create a MySQL deployment.
  5. service-mysql.yml - expose MySQL instance.
  6. 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

0 Answers
Related