Follow @YongkangHe on Twitter, Subscribe K8s Data Management Youtube Channel
1 CMD in 6 mins to build a ready-to-use Kasten demo lab on GKE cluster (GKE+Postgresql+K10).
I just want to build a GKE Cluster to play with the various Data Management capabilities e.g. Backup/Restore, Disaster Recovery and Application Mobility. It is challenging to create a GKE cluster from Google Cloud if you are not familiar to it. After the GKE Cluster is up running, we still need to install Kasten, create a sample DB, create policies etc.. The whole process is not that simple.
This script based automation allows you to build a ready-to-use Kasten K10 demo environment running on GKE in about 6 minutes. For simplicity and cost optimization, the GKE cluster will have only one worker node and be built in the default vpc using the default subnet. This is bash shell based scripts which has been tested on Cloud Shell. Linux or MacOS terminal has not been tested though it might work as well.
If you already have a GKE cluster running, you only need 3 minutes to protect containers on GKE cluster by k10-deploy.sh.
Subscribe K8s Data Management Youtube Channel
- Go to open Google Cloud Shell
- Clone the github repo to your local host, run below command
git clone https://github.com/yongkanghe/gke-k10.git
- Create gcloud service account first
cd gke-k10;./createsa.sh
- Optionally, you can customize the clustername, machine-type, zone, region, bucketname
vi setenv.sh
Don't have a GKE cluster | Already have a GKE cluster | Have nothing |
---|---|---|
Deploy GKE | Deploy K10 | Deploy GKE and K10 |
./gke-deploy.sh |
./k10-deploy.sh |
./deploy.sh |
1.Create a GKE Cluster | 1.Create a GKE Cluster | |
1.Install Kasten K10 | 2.Install Kasten K10 | |
2.Deploy a Postgresql database | 3.Deploy a Postgresql database | |
3.Create a GCS profile | 4.Create a GCS profile | |
4.Create a backup policy | 5.Create a backup policy | |
5.Kick off on-demand backup job | 6.Kick off on-demand backup job |
Destroy GKE | Destroy K10 | Destroy GKE and K10 |
---|---|---|
./gke-destroy.sh |
./k10-destroy.sh |
./destroy.sh |
1.Remove the GKE Cluster | 1.Remove the GKE Cluster | |
1.Remove Postgresql database | 2.Remove all the relevant disks | |
2.Remove Kasten K10 | 3.Remove all the relevant snapshots | |
3.Remove the GCS storage bucket | 4.Remove the GCS storage bucket |
Subscribe K8s Data Management Youtube Channel
Subscribe K8s Data Management Youtube Channel
Subscribe K8s Data Management Youtube Channel
Subscribe K8s Data Management Youtube Channel
Subscribe K8s Data Management Youtube Channel
https://blog.kasten.io/posts/postgresql-backup-and-restore-on-google-cloud-using-kasten-k10