Getting started

I'm going to detail the process of moving an existing Ghost blog/website from GKE to Civo Kubernetes, utilising Kasten K10 to allow us to move data between the two.

This guide assumes you are running a Ghost blog on Google Kubernetes Engine and are looking to move it to Civo Kubernetes. You will need the following installed and/or set up:

Backup of existing application

When deploying to GKE, I recommend you follow the guide and create the proper service account to ensure K10 has the nessessary cluster permissions.

Firstly we need to deploy K10 from Kasten, to do this you can follow this guide direct from their documentation.

Once deployed, you will need to a remote storage location. For simplicity and speed I have deployed a Minio instance in Civo K8s from the marketplace, but this can be any remote endpoint you prefer:

Kasten location profiles

Kasten location configuration

The configuration of K10 is pretty straightforward. You can either follow the official documentation here or I also have a guide specifically on this here.

When restoring to a new cluster and in this case to a new provider, we need to alter the backup job within Kasten slightly, by enabling export volume data:

Kasten dashboard showing the Edit Policy screen allowing for exporting of volume data

You will also need to copy the import data, this is used in the destination cluster restore:

Kasten data import settings

Kasten data import confirmation and instructions for retaining the token

Starting our Civo cluster

Once you have a successful backup on your remote storage by following one of the guides linked above, deploy a new Civo K8s cluster. For simplicity and speed I advise using the CLI:

civo k3s create -s g3.k3s.medium -n 1 --wait --save --merge

For the purpose of this guide this will only create a single node medium cluster, please alter if required.

We can then deploy K10 by again following my previous guide.

Restoring the application

Once K10 is up and running we can start our restore. Because we are moving from GKE to Civo, we need to do a transformation on the storage class. Fortunately this is built into K10!

First we need to create a new profile, but this time select IMPORT, as you can see below you will need to paste the import data you exported previously:

Kasten data import screen showing the data token entry that corresponds to the sending cluster

Once this policy is created, you can run it:

Kasten K10 policy running screen

You will then see the Ghost application in the application screen once you select "removed" from the drop-down:

Kasten showing an application called "Ghost" removed

As you can see there is an option to restore the application. When you click this, we need to make a slight change to the restore to allow for the storage class change. From the restore screen we need to select "new transform":

Kasten option for "new transform" of a storageclass

Then you can enter the following transform:

Kasten transformation of storage options from GKE to Civo

This should be all you need and you can start the restore of the application.

Some final changes

Once the restore completes you will see the pods starting up. Due to the fact that we have moved from GKE, you will need to make some changes:

  • Alter the service type from LoadBalancer to ClusterIP

Service Type LoadBalancer showing as "pending" on Civo, as seen from the K9s tool

  • Delete the Ghost LoadBalancer DaemonSet

Deleting a DaemonSet running in a cluster as shown on K9s

You should now be able to access the application via a standard ingress route or any alternative ingress you want to setup.

Thank you for taking the time to follow this guide, if you have any comments or need any assistance please reach out to me directly on Twitter or via the official Civo Kubernetes Slack channel.