Field notes · short-form

Notes

9 notes · newest first · last logged 2026-05-28

May 28

kubectl can sort by anything in the object

Stop eyeballing pod age. --sort-by takes any JSONPath, so you can rank by restart count and surface the flapping pod immediately.

shell
$ kubectl get pods --sort-by='.status.containerStatuses[0].restartCount'
#kubernetes#tools
May 19

Go 1.22's http.ServeMux finally does method routing

You can drop the third-party router for most services now. mux.HandleFunc("POST /items/{id}", h) gives you path params and method matching in the standard library — one fewer dependency to patch.

#golang#til
May 11

Workload Identity beats a mounted key, even for "just a cron"

If a job touches a cloud API, it can use federation. There's no traffic too small to justify a long-lived service-account key sitting on disk waiting to leak. The cron is exactly the thing nobody rotates.

#gcp#security
May 02

The fastest observability win is one well-placed exemplar

Trace exemplars on your latency histogram turn "p99 is bad" into "here's the exact slow request." Wire them before you add another dashboard nobody reads.

#observability
Apr 24

Terraform moved blocks are an apology you write in advance

Refactoring resource addresses without a moved block means a destroy/recreate you didn't intend. Add the block in the same PR as the rename and the plan stays a no-op.

main.tfhcl
moved {  from = aws_instance.web  to   = aws_instance.frontend}
#terraform#til
Apr 15

A readiness probe that hits the database is a footgun

If your readiness probe checks the DB, one slow database evicts every replica at once and you've turned a degradation into an outage. Probe liveness of the process; let the app handle dependency failure gracefully.

#kubernetes#reliability
Apr 03

Postgres FOR UPDATE SKIP LOCKED is a queue you already own

Before reaching for a broker, remember Postgres can be a perfectly good job queue for moderate throughput. SKIP LOCKED lets workers grab rows without blocking each other.

#postgres#architecture
Mar 22

OIDC discovery saves you from hard-coding JWKS URLs

Fetch /.well-known/openid-configuration once and you get the JWKS endpoint, supported algorithms, and issuer — all the things people otherwise paste into config and forget to rotate.

#oidc#security
Mar 09

GOMEMLIMIT is the flag your OOMKilled pods wanted

Go's GC didn't know about your container's memory cap. Set a soft GOMEMLIMIT and the runtime collects more aggressively before the kernel does it for you.

#golang#kubernetes