Tag: kubernetes

  • Solved: Uninstallation of config-connector Got Stuck in ArgoCD

    The Kubernetes Config Connector is another level of IaC(Infrastructure as Code): It wraps Google Cloud resources like a Cloud Load Balancer with Kubernetes CRDs(Custom Resource Definition) so instead of writing Terraform HCL I can write YAML to manage GCP infrastructure. However when there’s a need to uninstall a config-connector, it got stuck in ArgoCD As…

  • Django DB Migration Job with ArgoCD

    A Job in Kubernetes is a one-off and immutable task to be carried out during deployment. But what if a job needs to run for each deployment? A new job with the same name can’t be deployed on top of the existing one, given it in completed or failed state. Since Kubernetes 1.23, A TTL(Time…

  • Cloud SQL MySQL: Best Password is No Password

    Security for web applications has come a long way. In the case of database passwords, there is a lot of approaches to keep them safe: But isn’t it the best if there’s no need for a password at all? With IAM authentication for Cloud SQL, the password can be avoided after all. Here’s how to…

  • How to Self-Host a Mastodon Instance in Kubernetes

    TL;DR: Instead of the official installation including setting up Ruby, nginx, systemd service, etc., I found it more comfortable to install and run a Mastodon instance using some YAML files. Just in case, what is Mastodon anyway? I used kustomize to manage and generate Kubernetes manifests for a fully functional Mastodon instance. Please see my…

  • Kubernetes 1.24: Bye Bye Docker

    Since I just got extra 4 CPU cores and 32GB of memory to my garage Kubernetes lab cluster, there’s enough capacity to let me juggle some upgrades. My cluster was running Kubernetes version 1.22 for almost a year which is already reaching end-of-life in many commercial managed Kubernetes offerings. After some reading I found that…

  • 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…

  • How to Use a Local Persistent Volume

    TL;DR: A local persistent volume in a Kubernetes cluster is a persistent volume allocated in a certain node. Any pod mounting the volume will be automatically scheduled in the same node. Since it’s limited to 1 node, clearly it can’t be used as a high-availability solution, but hey, it’s quite Ok to use it for…

  • How To Renew Certificates in Kubernetes Clusters, Revisited

    There is a lot of TLS certificates used by the core of a Kubernetes cluster and a popular one is the client-server pair used by kubectl to authenticate to the cluster control plane. In my previous notes on how to renew certificates in a Kubernetes cluster with kubeadm, I found that the steps are quite…