Excited to share a new Go library I’ve built to make fetching Kubernetes resources a breeze: go-kube-get!
If you’ve worked with client-go to build internal tools or CLI applications, you know that mapping simple user inputs like po
or deploy
to the precise API group and version (core/v1/pods
, apps/v1/deployments
) can introduce a lot of boilerplate code.
go-kube-get sits on top of the Kubernetes Go ecosystem to solve this specific challenge.
It gives your application a kubectl-compatible interface. Instead of manually writing logic to map every short name, you can simply call:
kubeget.Get(ctx, "deploy", "default") // or "po", "svc", etc.
client-go is the engine for complex operations (create, update, watch), but go-kube-get is the translator that lets you easily consume user-provided resource names, just like kubectl
does.
Why use go-kube-get?
- ✅ Familiarity: Accepts kubectl-style names (
po
,deploy
,svc
). - ✅ Simplicity: Handles all the complex API discovery and mapping for you.
- ✅ Flexibility: Supports built-in resources, custom resources, and fully qualified names.
It’s open source under the Apache-2.0 license. I’d love for you to check it out, give it a star, and share your feedback!
🔗 GitHub Repository: https://github.com/hbelmiro/go-kube-get