-
How to Connect to Cloud SQL via SSH
TL;DR: here’s a handy bash script which can connect to a private Cloud SQL instance(MySQL in this case) via a bastion host. Prerequisites: Google Cloud SQL instance with mTLS certs provisioned Google Cloud SDK installed(the gcloud command) a bash shell(better be V5.0+) OpenSSH and MySQL CLI installed Google Cloud SQL is an RDB as a…
-
A Load Balancer for Cloud SQL Replicas
TL;DR: As of Aug 2022, there’s no out of box load balancing for Google Cloud SQL read replicas. So I built one for MySQL replicas with HAProxy with the ability to dynamically reload when number of replicas has changed. It will be quite straight forward to run a few HAProxy pods in Kubernetes as a…
-
Some Field Test with Google Cloud Run
Recently I got a chance to migrate on-premise applications to GCP(Google Cloud Platform), and ran the apps in containers via Cloud Run. Here are some pros and cons that I think about the fully managed Cloud Run. Pros: Very easy to get started. As long as the app can run in a container, it can…
-
Fixed gsutil OSError: Permission Denied
When trying to run gsutil in a kubernetes Job as nobody to backup stuff to Google Cloud Storage(GCS), I encountered simple error messages like But it didn’t say where or how the permission was denied! It worked fine if the container was run as root user so the problem is not with Google Cloud. I…