Building and Maintaining a Client Library - Stories From the Trenches
summary
Built a Ruby client library k8s-client that handles real-world Kubernetes quirks: supports external auth hooks (gcloud, EKS), works with clusters back to 1.7, and avoids codegen by treating CRDs as generic resources. Implements a client-side three-way merge using a last-applied annotation and issues RFC-compliant JSON Patch ops because server strategic merge often surprises (e.g., arrays merging into duplicates). Discovery runs on every start (no cache) to pick up new CRDs, drops empty values from stored config, and deliberately keeps no high-level helpers to reduce maintenance.
AI-written summary · about
chapters (12)
- 0:00Start
- 0:58Topics
- 2:55Word of "wisdom"
- 4:52Open source
- 5:58Request processing stages
- 7:41Auth is a moving target
- 10:00Kubeconfig is hard
- 12:09Naïve approach
- 13:30Why not just PUT the resource?
- 14:44Strategic merge patch
- 18:12Server-side apply
- 23:51API discovery
related talks
38mSIG CLI Deep Dive
43mClient Library Design Stories
54mClosing the Developer Experience Gap in the Kubernetes Ecosystem
28mKubernetes CRD Design for the Long Haul: Tips, Tricks, and Lessons Learned
37mDeveloper Tooling for Kubernetes Configuration
53mHow not to fuckup with building SDK and make clients happy
36mThe Road to More Usable Kubernetes
32mSponsored Session: Championing GraphQL Client in a Modern Platform
