avatar

Hi there

Welcome to alpaca-lab.blog — a blog about technology 💻, software 🛠️, and custom keyboards ⌨️.

Building a solder-free, single-switch ZMK wireless keyboard PoC

Overview The keyboard I actually use day to day is a pretty standard wired build: Pro Micro + QMK Firmware. I’ve been wanting to build a fully wireless version of it, so as a first step I decided to get my hands on an XIAO nRF52840 and try out ZMK. I wanted to walk through the whole loop first at the smallest possible scale — set up a ZMK config repo, build it, flash it, and pair over Bluetooth — so this post shares what that looked like. ...

September 18, 2026 · 6 min · hhiroshell

The Startup Sequence When a Pod Has Multiple Containers

Overview I wrote a Kubernetes book called “Kubernetesマイクロサービス開発の実践” (Practical Kubernetes Microservices Development), and it’s now out! Please go buy it! “Kubernetesマイクロサービス開発の実践” Chapter 7 of the book covers the process from when a Pod object is created on the API Server to when the Pod actually starts running — but for various reasons, there’s one particularly nitty-gritty piece of behavior we couldn’t fit in the book: what happens when a Pod has multiple containers, and one or more of them uses a postStart lifecycle hook. This post writes up how such a Pod behaves when it starts. ...

December 21, 2023 · 9 min · hhiroshell

Digging into the kubelet API

Overview I found myself wanting to build something using the kubelet API, so I did some research to figure out how, and I’d like to share what I learned. Up until now I’d never really had a reason to touch it directly — I knew it was used for collecting container metrics, and every so often I’d think “ah, the kubelet API is out there working hard today too,” and that was about the extent of my relationship with it. I suspect a lot of Kubernetes engineers feel roughly the same way. ...

December 19, 2022 · 5 min · hhiroshell

Triggering Reconcile from Arbitrary Events with a Custom Controller

Overview I looked into how to write a custom controller that triggers Reconcile based on events happening outside the Kubernetes cluster, and this post writes up what I found. Once you can do this, you can build controllers that use Kubernetes custom resources to manage systems that live outside the cluster. Neat! 📘【note】 This post is day 3 of Kubernetes Advent Calendar 2021. Yesterday’s post was @makocchi’s Advanced StatefulSet を使ってみよう (Let’s try Advanced StatefulSet). ...

December 2, 2021 · 7 min · hhiroshell

Safe Pod Termination — Even an Alpaca Can Understand It (Experiment Edition)

Overview This post is a follow-up to Safe Pod Termination — Even an Alpaca Can Understand It. Last time, we walked through what happens when a Pod terminates, based on how the various Kubernetes components work. A Deployment rolling update involves restarting Pods, and we found that the following two countermeasures are effective for handling requests without loss during that process: Sleeping in the preStop hook Implementing graceful shutdown in the application In this post, we’ll actually perform a Deployment rolling update while live traffic is flowing, and check whether those countermeasures really work. ...

December 17, 2020 · 8 min · hhiroshell

Safe Pod Termination — Even an Alpaca Can Understand It

Overview This post organizes what actually happens from the moment a Pod starts terminating in Kubernetes until it’s gone. Building on that, it looks at how to terminate Pods safely — that is, with minimal loss of in-flight requests. The application model assumed here is a typical web application that receives HTTP requests and returns responses. 📘【note】 This post is based on @superbrothers’s “詳解 Pods の終了” (A Detailed Look at Pod Termination) and the official documentation — please check those out too. This post re-verifies the content against the latest Kubernetes as of 2020/09/23, and adds diagrams and extra explanation. ...

September 18, 2020 · 6 min · hhiroshell