Alan Zhan Blog

Live for nothing, or die for something

Building a Private GKE Cluster with Terraform

Let’s spend about ten minutes together — I’ll walk you through using Terraform to build a private GKE Cluster step by step! Setting Up GCP Create a Service Account First, go to the Google …

Kubernetes Core Component: Kubelet

Kubelet Architecture As shown in the kubelet internal component structure diagram below, Kubelet is composed of many internal components: Kubelet API: Including the authenticated API on port 10250, …

Kubernetes Core Component: Controller Manager

Controller Manager is the automation control center of a Kubernetes cluster, containing over 30 controllers that manage Pod-related, network-related, storage-related operations, and more. Most …

Kubernetes - Node Maintenance and Pod Migration

Our company recently discovered machines on GKE with particularly low resource utilization. Those unused resources are still costing money, so we created a new Node Pool with lower and cheaper …

Kubernetes Core Component: Scheduler

Strictly speaking, the Scheduler is a special type of Controller — its working principle is no different from other controllers. The Scheduler’s special responsibility is to monitor all …

Kubernetes Core Component: API Server

API Server kube-apiserver is one of the most important core components of Kubernetes, providing the following key features: Cluster management REST API, including authentication, authorization, data …

MongoDB Index Best Practices

After the sorted operation OOM incident in production from the previous post, I realized my understanding of MongoDB indexes wasn’t as deep as it should be. I started searching extensively and …

MongoDB Sorted Operation OOM

This is a rare case where I learned by working backward from a problem — I’d better document it well. Recently, our production environment hit a MongoDB sort operation limit with this specific …

Kubernetes Core Component: etcd

In any system, what is the most important thing? The answer is simple: data. So I’m starting my deep dive with Kubernetes’ database — etcd! What is etcd? etcd is a distributed key-value …

Installing Kubernetes with Kubeadm - Twice

To better understand K8s through hands-on practice, I wanted to set up a K8s cluster myself. There are increasingly many ways to self-host K8s nowadays — minikube, Kubeadm, and more. I decided to go …